Skip to content

Commit

Permalink
Fix locking in ReflectionComposablePart.ImportsCache (#103660)
Browse files Browse the repository at this point in the history
The second check needs to use the value from the field (to see updates
made by other threads), not the local variable.

Fixes: #103650
  • Loading branch information
omajid authored Jun 19, 2024
1 parent 4a0a04c commit 2fc073f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ private Dictionary<ImportDefinition, ImportingItem> ImportsCache
{
lock (_lock)
{
value = _importsCache;
if (value == null)
{
value = new Dictionary<ImportDefinition, ImportingItem>();
Expand Down

0 comments on commit 2fc073f

Please sign in to comment.