This section documents changes to system functions.
function( type : types.yield_type, extra : variable ) : variable
Lua functions can yield at any point. The parameters and return types depend on why we want to yield.
A callback that is yielding allows other Lua code to run.
WAIT_MS: one extra parameter; the execution will pause for that many miliseconds; yield returns nothing;
FILE_READABLE: an opened file from a call to the OS library; will return when the file is readable; returns nothing;
RUN_COMMAND: a command to be run by "sh -c"; will return when the command terminates; returns the return code of the execution.
The type of yield.
An extra parameter: integer for "WAIT_MS", open file for "FILE_READABLE", string for "RUN_COMMAND".
Nothing for "WAIT_MS" and "FILE_READABLE"; the returned code of the command for "RUN_COMMAND".