| Allegro CL version 10.1 This page is new in 10.1. |
This struct, instances of which are created by process-pool-run or by make-process-pool-work-item, holds information about what a process-pool process is supposed to do and the state of the work. It has the following slots:
function
: The function to be run when the work-item
is active. There is no reader for this slot.
arguments
: The list of arguments which will be
passed to the work-item's function. There is no reader for this slot.
queued-time
: The time when the entry was queued, in
internal time units. The associated reader function is process-pool-work-item-queued-time.
start-time
: The time when the entry started running
in internal time units. The associated reader function is process-pool-work-item-start-time.
end-time
: The time when the entry stopped running
in internal time units. The associated reader function is process-pool-work-item-end-time.
report-start
: A function of one argument (the
work-item) called before the work-item function. If this slot
is nil
, use the report-start function in the
process-pool
instance. To
have nothing done, define a function that does nothing and make it the
value of this slot.
report-end
: A function of three arguments (work-item
values error) called after the work item function exits. If this slot
is nil
, use the report-start function in the
process-pool
instance.
To have nothing done, define a function that
does nothing and make it the value of this slot.
values
: The values returned by the work-item
function. If the work-item was terminated because of a call
to cancel-process-pool-work, a
list of the values of the values arguments (which
are the &rest arguments to cancel-process-pool-work after the first) is saved
in this slot. The associated reader function is process-pool-work-item-values.
error
: If the work-item function signals an error
when run, the value of this slot is the condition instance. If the
function exited because of a call to throw, the value of this slot will be the
keyword :throw
. If the work-item was terminated
because of a call to cancel-process-pool-work or
cancel-process-pool-worker,
the value of this slot will be the value of
the reason argument (which is the first of the
&rest arguments to cancel-process-pool-work and the optional
argument to cancel-process-pool-worker). If two things would
supply a value for this slot (an error signaled in the work-function
and a call to cancel-process-pool-worker in the report-end
function), the last to occur will provide the value of the
slot. Otherwise, the value of this slot
is nil
. The associated reader function
is process-pool-work-item-error.
data
: Application data accessible to the work
function. The associated reader function is process-pool-work-item-data. The
variable *process-pool-work-item*
is bound to the running
work-item when a work-item is being run by a process. Applying the
data reader function to that variable will return the value of the
data slot, which can then be used by the work-item function or
report-start or report-end functions.
property-list
: The value of this slot is stored in the
process-property-list slot of
the worker process while the work-item is running.
The associated reader function is process-pool-work-item-property-list.
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. |