Skip to content

Commit

Permalink
fix queue converter singleton initialization (#56081)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriktsarpalis committed Jul 22, 2021
1 parent 00b81b0 commit 4d08b80
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal sealed class QueueOfTConverter<TCollection, TElement>
where TCollection : Queue<TElement>
{
/// <summary>Lazily initialized singleton for hardcoding by the IAsyncEnumerable streaming deserializer.</summary>
internal static QueueOfTConverter<TCollection, TElement> Instance = _instance ??= new();
internal static QueueOfTConverter<TCollection, TElement> Instance => _instance ??= new();
private static QueueOfTConverter<TCollection, TElement>? _instance;

protected override void Add(in TElement value, ref ReadStack state)
Expand Down

0 comments on commit 4d08b80

Please sign in to comment.