A name for the new process.
Keywords specifying properties of the new process.
A function to apply.
Arguments to pass to function .
This function creates a new Lisp process with name name. Other properties of process may be specified in keyword/value pairs in keywords :
A
fixnum
representing the priority for the process. If
:priority
is not supplied, the process priority becomes the value of the variable
*default-process-priority*
.
A mailbox object or
nil
, used to initialize the
process-mailbox
of
process
.
The new process is preset to apply
function
to
arguments
and runs in parallel, while
process-run-function
returns immediately.
CL-USER 253 > (defvar *stream* *standard-output*)
*STREAM*
CL-USER 254 > (mp:process-run-function
"My process"
'(:priority 42)
#'(lambda (x)
(loop for i below x
do (and (print i *stream*)
(sleep 1))
finally
(print (mp:process-priority
mp:*current-process*)
*stream*)))
3)
#<MP:PROCESS Name "My process" Priority 850000 State "Running">
0
1
2
42
CL-USER 255 >