| Allegro CL version 10.1 This page is new in 10.1. | ||||||||||
Arguments: pool &key work function arguments name report-start report-end data (queue-p t)
The default method of this generic function (specializing
on nil and process-pool objects) does two things:
process-pool-work-item if
the work argument
is nil, or modfies the
process-pool-work-item
specified by the work argument.
Two values are returned:
:created (meaning the
work-item started to run in a newly-created pool
process); :started (meaning the work-item started
to run in an existing idle pool process); :queued
(meaning the work-item was added to the queue of unrun work-items for
the pool); or nil (meaning the work-item was
neither run nor queued).
nil,
meaning the work-item was neither run nor queued, the work-item can be
later passed as the work keyword argument
to process-pool-run in order
to attempt to run or queue it again.
Here are the arguments and their meanings:
process-pool instance or
nil. If it is a process-pool instance, the system will try to
start running a process-pool-work-item in one of the pool's
processes. If it is nil, the system will try
to start running a process-pool-work-item in the default
process-pool (see ensure-default-process-pool). It is an error to
specify nil when there is no default
process-pool. The work-item to be run is either created using the
keyword arguments to process-pool-run or is an existing work-item
specified by the work keyword argument, possibly
modified by the other keyword arguments.
nil or an existing
process-pool-work-item. If
the value is nil (which is the default), a
new process-pool-work-item
will be created with slots specified by the additional keyword
arguments to process-pool-run. If the value is an existing
work-item (created either by make-process-pool-work-item or by a previous
call to process-pool-run),
that work-item will be modified by supplied process-pool-run keyword arguments. Note that
unsupplied keyword arguments to process-pool-run do not modify the corresponding
slot values of an existing work-item.
function
slot of the supplied (by the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the function slot will
be nil in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument. When the function
is nil, the work-item does nothing except run
the report-start and report-end functions.
arguments
slot of the supplied (by the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the data slot will
be nil in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument.
name
slot of the supplied (by the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the name slot will
be created by the system in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument.
report-start slot of the supplied (by
the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the report-start
slot will be nil in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument. A value
of nil for the report-start
slot means the process-pool
report-start function will be run at the beginning of running the work-item.
It does not mean that no report-start function will be run.
report-end
slot of the supplied (by the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the report-end slot will
be nil in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument. A value
of nil for the report-end
slot means the process-pool
report-end function will be run at the end of running the work-item.
It does not mean that no report-end function will be run.
data slot of the supplied (by
the work argument) or
newly-created process-pool-work-item will be set to the value
of this argument. If unsupplied, the data slot will
be nil in a newly-created
process-pool-work-item and
unchanged in one supplied as the value of
the work argument.
nil (the default), then if
the work-item cannot be run immediately because the maximum number of
active processes in the pool are already running (see
process-pool-active-limit),
then the work-item will be added to the pool queue if possible (see
process-pool-work-limit). If
queue-p is nil, the
work-item will not be queued if it cannot immediately be run and
process-pool-run will return
nil as its first return value.
See Process pools in multiprocessing.htm for more information on process pools.
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page is new in the 10.1 release.
Created 2019.8.20.
| Allegro CL version 10.1 This page is new in 10.1. | ||||||||||