init
initializes the system and creates the master process. master_init
, if
specified, is called in the master process and may be used for cleanup/initialization
such as closing file descriptors. init
should be called before any threads are
created. If your program daemonizes, call init
after you daemonize, but before you
start the async scheduler. init
may only be called once.
If cluster
is specified, and it specifies a set of host names or ips that you can
ssh to without a password, and have permission to run programs on, then a master
process will also be started on these machines, and you will be able to spawn worker
processes on these machines. The current machine is implicitly included in the set of
available machines.
All the functions below are called in either the main process or a worker process.
Request a new process. Returns the ip/port where the new process may be reached. If
specified where
determines which machine the process will be spawned on, the default
is `Local (the current machine).
Tell the master process to shutdown.