chore(perf): bump version to 9.0.40 to match MAUI 9.0.40
Update version from 9.0.0 to 9.0.40 to align precisely with MAUI 9.0.40 release. Update CHANGELOG, package metadata, and templates. Fix thread safety issue in FontFallbackManager by changing _glyphCache from Dictionary to ConcurrentDictionary to prevent race conditions during concurrent glyph lookups.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Microsoft.Maui.Platform.Linux.Services;
|
||||
@@ -81,7 +82,7 @@ public class FontFallbackManager
|
||||
|
||||
// Cache for typeface lookups
|
||||
private readonly Dictionary<string, SKTypeface?> _typefaceCache = new();
|
||||
private readonly Dictionary<(int codepoint, string preferredFont), SKTypeface?> _glyphCache = new();
|
||||
private readonly ConcurrentDictionary<(int codepoint, string preferredFont), SKTypeface?> _glyphCache = new();
|
||||
|
||||
private FontFallbackManager()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user