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