(index ("spawn" 0) ("!" 131) ("?" 229) ("??" 361) ("!?" 462) ("recv" 603) ("spawn-link" 996) ("spawn-linked-to" 1225) ("make-node" 1494) ("node-init" 1639) ("remote-spawn" 1769) ("remote-spawn-link" 1959) ("on" 2125) ("with-exception-catcher" 2258) ("with-exception-handler" 2524) ("raise" 2789) ("catch" 2879) ("shutdown!" 3025) ("halt!" 3155) ("terminate!" 3278))
(def (sig (procedure "(spawn THUNK)" (id spawn))) (p "Create a process running " (tt "thunk") " and returns its " (tt "pid") "."))
(def (sig (procedure "(! PID MSG)" (id !))) (p "Send " (tt "msg") " to process " (tt "pid") "."))
(def (sig (procedure "(? [TIMEOUT [DEFAULT]])" (id ?))) (p "Fetch a message from the mailbox.  " (tt "timeout") " is in seconds."))
(def (sig (procedure "(?? PRED)" (id ??))) (p "Fetches next message that matches " (tt "pred") "."))
(def (sig (procedure "(!? PID MSG [TIMEOUT [DEFAULT]])" (id !?))) (p "Send " (tt "msg") " to process " (tt "pid") " and wait for a reply."))
(def (sig (procedure "(recv ((PAT VAR ACTION) [...]) [(after TIMEOUT TMO-ACTION)])" (id recv))) (p "Receive a message, when it matches " (tt "pat") " put it in " (tt "var") " and take " (tt "action") " (there can be many of these).  Optionally, do " (tt "tmo-action") " after " (tt "timeout") ".") (p "(This was documented from the termite.pdf, but it's not exported in chicken's termite.)"))
(def (sig (procedure "(spawn-link THUNK)" (id spawn-link))) (p "Create a process running " (tt "thunk") " and returns its " (tt "pid") " and link to it.  When either process dies, and exception is raised in the other process."))
(def (sig (procedure "(spawn-linked-to THUNK TO)" (id spawn-linked-to))) (p "Create a process running " (tt "thunk") " and returns its " (tt "pid") " and have it link to " (tt "to") " (a pid).  When either process dies, and exception is raised in the other process."))
(def (sig (procedure "(make-node HOST PORT)" (id make-node))) (p "Creates a node object for " (tt "host:port") " and returns the node object."))
(def (sig (procedure "(node-init NODE)" (id node-init))) (p "Primary setup for creating a " (tt "node") " to accept processes."))
(def (sig (procedure "(remote-spawn NODE THUNK)" (id remote-spawn))) (p "Run " (tt "thunk") " on " (tt "node") ", returns " (tt "pid") ".  Node needs to have done a " (tt "node-init") "."))
(def (sig (procedure "(remote-spawn-link NODE THUNK)" (id remote-spawn-link))) (p "Run " (tt "thunk") " on " (tt "node") " and link to it, returns " (tt "pid") "."))
(def (sig (procedure "(on NODE THUNK)" (id on))) (p "Run " (tt "thunk") " on " (tt "node") ", returns result of " (tt "thunk") "."))
(def (sig (procedure "(with-exception-catcher HANDLER BODY)" (id with-exception-catcher))) (p "Installs a dynamically scoped exception handler " (tt "handler") " for the duration of " (tt "body") ".  Resumes execution a the point where the handler was installed."))
(def (sig (procedure "(with-exception-handler HANDLER BODY)" (id with-exception-handler))) (p "Installs a dynamically scoped exception handler " (tt "handler") " for the duration of " (tt "body") ".  Resumes execution a the point where the exception was raised."))
(def (sig (procedure "(raise EXCEPTION)" (id raise))) (p "Raises " (tt "exception") "."))
(def (sig (procedure "(catch HANDLER BODY)" (id catch))) (p "Catches an exception with " (tt "handler") " during execution of " (tt "body") "."))
(def (sig (procedure "(shutdown!)" (id shutdown!))) (p "Stops gracefully.  Linked processes receive a \"normal\" exit message."))
(def (sig (procedure "(halt!)" (id halt!))) (p "Stops ungracefully.  Linked processes are clueless as to what happened."))
(def (sig (procedure "(terminate! VICTIM)" (id terminate!))) (p "Forcefully terminate a local(!) process.  Processed linked to " (tt "victim") " get a " (tt "terminated") " message."))
