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