Skip to main content

Module worker

Module worker 

Source

Functions§

post
to: a worker id (from the main instance) or 0 (from a worker to its parent). Returns false if the receiver’s queue is full.
recv
Next message as (sender, bytes). A sender with the high bit set reports that worker sender & 0x7fffffff died (the bytes are the reason).
spawn
Starts a worker instance of this module; arg is its first message.
terminate