You're reading the documentation for a development version.
For the latest stable release version, please have a look at master.

Thread-less API

There are some functions that you can use to avoid the need for threading, but which still allow you to control the flow of simulation time.

Threadless functions


delayed(delay){ callback }

Register the callback code to be called at a simulation time delay steps after the current timestep.

The advantages of the delayed function over using a regular simulation thread + sleep are:

  • Performance (no context switching)

  • Memory usage (no native JVM thread memory allocation)

Some other thread-less functions related to ClockDomain objects are documented as part of the Callback API, and some others related with the delta-cycle execution process are documented as part of the Sensitive API