Scieneer Common Lisp 1.3.9 online documentation

thread:thread-create function &key name background-streams-p[Function]

Create a new thread, returning the thread object. When the new thread starts it calls the given function, and upon return will exit. A thread :name may be provided which defaults to "Anonymous".

When :background-streams-p is true, and when attached to a capable interface, the thread will bind the standard streams to background streams. Background streams are only opened when there is input or output, and will typically be opened in a fresh interface window avoiding clashes will other threads. The default value for the :background-streams-p argument is the value of thread::*use-background-streams*.

Each thread requires various local memory regions. These are currently allocated upon thread startup, obtaining the size from global variables: vm::*alien-stack-size*, lisp::*binding-stack-size*, vm::*control-stack-size*, vm::*foreign-stack-size*, lisp::*symbol-dynamic-values-size*. Future developments will likely allow the stack sizes to be passed to thread-create so that threads with varying region sizes can be safely created.