Browse Source
Update tests/Avalonia.Base.UnitTests/Media/FontManagerTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/21269/head
Benedikt Stebner
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
tests/Avalonia.Base.UnitTests/Media/FontManagerTests.cs
|
|
|
@ -117,7 +117,8 @@ namespace Avalonia.Base.UnitTests.Media |
|
|
|
for (int i = 0; i < iterations; i++) |
|
|
|
{ |
|
|
|
// Remove the cached collection so both threads must re-create it.
|
|
|
|
fontCollections.TryRemove(collectionKey, out _); |
|
|
|
if (fontCollections.TryRemove(collectionKey, out var removedCollection)) |
|
|
|
removedCollection.Dispose(); |
|
|
|
|
|
|
|
using var barrier = new Barrier(2); |
|
|
|
bool r1 = false, r2 = false; |
|
|
|
|