Skip to content

Commit

Permalink
Merge pull request #163 from stukselbax/master
Browse files Browse the repository at this point in the history
Make shared cache for types resolution thread safe
  • Loading branch information
codingseb authored Sep 22, 2023
2 parents 6aac80b + db0ad29 commit d5b780a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Dynamic;
Expand Down Expand Up @@ -474,7 +475,7 @@ protected enum TryBlockEvaluatedState
/// <summary>
/// A shared cache for types resolution.
/// </summary>
public static IDictionary<string, Type> TypesResolutionCaching { get; set; } = new Dictionary<string, Type>();
public static IDictionary<string, Type> TypesResolutionCaching { get; set; } = new ConcurrentDictionary<string, Type>();

/// <summary>
/// Clear all ExpressionEvaluator caches
Expand Down

0 comments on commit d5b780a

Please sign in to comment.