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 |
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 returns an estimate how many threads are executing concurrently at the moment.
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*.