Worker Task model element

WorkerTask defines a piece of code that can be run in a thread separate to the EJS model

Usage

To add a worker task code to your model, drag the icon element to the list of your model elements and enter the code to run.

The element implements the following basic methods:

Example of use

workerTask.startAndReturn(); // runs the task code in a separate thread 
_println ("The worker task code took "+workerTask.getExecutionTime()+" ms to run.");