Lock Variables while adding to it to prevent threading issues
This commit is contained in:
@@ -39,6 +39,8 @@ namespace Upsilon.Evaluator
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void AssignToNearest(VariableSymbol symbol, ScriptType value)
|
public void AssignToNearest(VariableSymbol symbol, ScriptType value)
|
||||||
|
{
|
||||||
|
lock (Variables)
|
||||||
{
|
{
|
||||||
if (Variables.ContainsKey(symbol.Name))
|
if (Variables.ContainsKey(symbol.Name))
|
||||||
{
|
{
|
||||||
@@ -53,6 +55,7 @@ namespace Upsilon.Evaluator
|
|||||||
Variables.Add(symbol.Name, value);
|
Variables.Add(symbol.Name, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateLocal(VariableSymbol symbol, ScriptType value)
|
public void CreateLocal(VariableSymbol symbol, ScriptType value)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user