The spawn
statement creates a new thread of control. It has the form:
spawn term (expression-listopt);The term and expression-list are taken to be a function call. Execution of
spawn
creates an asynchronous, independent thread of control, which calls the procedure named by term in the new thread context. This procedure can access the visible objects in the spawning thread; the two threads share common memory. Threads are preemptively scheduled. The Limbo language provides no explicit synchronization primitives; Monitors shows examples of how to use channel communication to control concurrence. Returning from the spawned procedure is equivalent to an exit
statement.