sleep close_call is too much - expression is sufficient since executes in the same context.
This commit is contained in:
1 parent
1268af4131
commit
6594b404bb
3 files changed
+13
-13
No files matched your search
@@ -88,7 +88,7 @@ public class Threading
|
||||
}
|
||||
});
|
||||
|
||||
expression.addLazyFunctionWithDelegation("sleep", -1, (c, t, expr, tok, lv) ->
|
||||
expression.addLazyFunction("sleep", -1, (c, t, lv) ->
|
||||
{
|
||||
long time = lv.isEmpty()?0L:NumericValue.asNumber(lv.get(0).evalValue(c)).getLong();
|
||||
boolean interrupted = false;
|
||||
@@ -107,9 +107,7 @@ public class Threading
|
||||
Value exceptionally = Value.NULL;
|
||||
if (lv.size() > 1)
|
||||
{
|
||||
FunctionArgument functionArgument = FunctionArgument.findIn(c, expression.module, lv, 1, false);
|
||||
FunctionValue fun = functionArgument.function;
|
||||
exceptionally = fun.callInContext(expr, c, t, fun.getExpression(), fun.getToken(), functionArgument.args).evalValue(c);
|
||||
exceptionally = lv.get(1).evalValue(c);
|
||||
}
|
||||
throw new ExitStatement(exceptionally);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user