Lock evaluation scope when not created to prevent threading issues
This commit is contained in:
@@ -27,11 +27,13 @@ namespace Upsilon.StandardLibraries
|
|||||||
{
|
{
|
||||||
if (_staticScope != null)
|
if (_staticScope != null)
|
||||||
return _staticScope;
|
return _staticScope;
|
||||||
|
lock (Scope)
|
||||||
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
{
|
||||||
_staticScope = evaluationScope;
|
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
||||||
_staticBoundScope = boundScope;
|
_staticScope = evaluationScope;
|
||||||
return _staticScope;
|
_staticBoundScope = boundScope;
|
||||||
|
return _staticScope;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user