pop

Function summary
active-threads
get-threads &optional (amount *max-threads*)
pmap result-type function &rest args
Macro summary
adecf place
aincf place
prun name (&rest bindings) &body body
*max-threads*    [Variable]

The maximum number of threads that can be spawned concurrently. Configure this to reflect the number of available cores, hyperthreads, etc. Note: There is no strict enforcement that this number will never be exceeded, because everything here is based on heuristics and estimates. It is recommended that *max-threads* is actually a bit lower than the number of concurrent threads granted by the operating system, to account for background threads required by the Common Lisp runtime, etc.

*active-threads*    [Variable]
active-threads    [Function]

Active-threads returns an estimate how many threads are executing concurrently at the moment.

get-threads   &optional (amount *max-threads*)  [Function]

Get-threads returns an estimate how many threads can be spawned concurrently at the moment. The desired amount of threads can be passed as an optional argument. The result depends on how many threads are estimated to be already executing at the moment (see the function active-threads), and the maximal number of threads that can be spawned. Get-threads always returns at least 1. The result can, for example, be used to determine the length of sequences passed to the function pmap. The overall behavior can be configured by setting *max-threads*.

pmap   result-type function &rest args  [Function]
aincf   place  [Macro]
adecf   place  [Macro]
prun   name (&rest bindings) &body body  [Macro]

Prun executes a body of code concurrently, with bindings that are visible in the newly spawned thread (as if per let). Increments the value returned by active-threads on enter, and decrements it on exit. The return value of prun is unspecified.