AngelScript
 
Loading...
Searching...
No Matches
Co-routines
Note
Support for co-routines is only available in the scripts if the application registers support for it.

Functions

funcdef void coroutine(dictionary@)
void createCoRoutine(coroutine @, dictionary @)

This function is used to create a co-routine. The co-routine will initiate in a yielded state, i.e. it will only begin execution once the control is given to it by the current thread.

Multiple co-routines can be created, and they will each take turn to execute in round-robin fashion.

void yield()

Yields control of the execution for the next co-routine in the queue.

When a co-routine receives control it will resume execution from the last call to yield, or the entry point if this is the first time the co-routine is allowed to execute.