-
Type:
Task
-
Resolution: Done
-
Priority:
Trivial - P5
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
None
-
Fully Compatible
-
TIG E (01/08/16)
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Passing a function to startParallelShell() unnecessarily introduces a variable into the started shell's scope (using random numbers to avoid a collision).
if (typeof(jsCode) == "function") { var id = Math.floor(Math.random() * 100000); jsCode = "var f" + id + " = " + jsCode.toString() + ";f" + id + "();"; }
Instead we can have jsCode immediately invoke the function expression, i.e.
startParallelShell(function() { ... }) becomes --eval (function() { ... })().