|
Allegro CL version 11.0 |
Class, multiprocessing package
This is the class of the barrier object. Barriers are created with make-barrier. See Barrier API in smp.html.
Class, multiprocessing package
The class of condition-variable
s. See Condition Variables in smp.html.
Class, multiprocessing package
This subclass of process is the class of all processes that participate in a pool. If an application specifies a class in make-process-pool, that class must include pool-process in its precedence list.
Only pool-process instances can be part of a process-pool.
See Process pools in multiprocessing.html for more information on process pools.
Class, multiprocessing package
The class of a process object. In releases prior to 7.0, this was a structure class. Starting in 7.0, it is a standard CLOS class. It can usefully be subclassed. Each process is represented by an instance of this class (or of an application-defined subclass).
Instances of mp:process have these user-visable slots:
thread
(reader: process-thread): is a lisp thread structure holding low-level information. process-thread (and the no-longer used process-stackgroup) used to be nil
until the process was made active. This was not a documented feature, but was used as a test of the process state in some code. Such uses will need to be changed. Use process-active-p.property-list
(accessor: process-property-list) is a place for application-specific properties.priority
(accessor: process-priority) Has the user-specified process priority. Default is 0. Higher priority values mean higher priority. In general, the highest priority ready process will be running, although this is a little fuzzy in native-thread models because a foreign call that released the heap may allow parallel execution.quantum
(accessor: process-quantum) number of seconds this process can hold the lisp heap before it will allow other ready processes a chance to run.exit-actions
(accessor: process-exit-actions) A list of actions of the form (function . arguments)
. When the process finishes, either normally or via an unwinding kill, it executes the actions by applying the functions to their argument lists.The rest of the process data is kept in the thread object; for example, process-name accesses a slot in the thread object.
See multiprocessing.html.
Class, multiprocessing package
The class of a process-lock object.
See multiprocessing.html.
Class, multiprocessing package
The class of a process pool (created by, for example, make-process-pool). This class has a number of slots. Readers for these slots all take a process-pool instance as their single argument. Those that return process pool parameters include:
The following readers report on the status of a process-pool:
The following readers report statistics on pool behavior:
See Process pools in multiprocessing.html for more information on process pools.
Class, multiprocessing package
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.html for more information on process pools.
Class, multiprocessing package
This is the class of queue objects. Queues are conceptually (but not necessarily implementationally) like first-in first-out lists, with objects being enqueued by being appended onto the end and dequeued by being popped off the front. Queues are more convenient than lists in a multiprocessing environment because enqueuing and dequeuing operations are atomic (they will complete without a process switch) and because dequeuing has a built-in wait capability. Queues have no intrinsic size limit.
Queues are created with make-instance. The following form will return a new queue:
(make-instance 'mp:queue)
See enqueue, dequeue, queue-empty-p, and Queues (both models) in multiprocessing.html.
Class, multiprocessing package
This is the class of the sharable-lock object. Sharable locks are created with make-sharable-lock. See Sharable locks in smp.html.
To avoid conflicts with the process-lock class, these two classes do not share any inheritance. None of the legacy process-lock functions apply to sharable locks and vice versa.
Class, multiprocessing package
The superclass of all the sharable-lock errors
See Sharable locks in smp.html.
Class, multiprocessing package
This error is signaled if a function called via process-interrupt attempts to obtain a lock while the process is in the middle of obtaining an exclusive lock. In that state, the process must allow interruptions but cannot allow any access to the lock from the same process. The only action possible is for the process-interrupt function to propagate the error to the caller of process-interrupt, where a second attempt may succeed.
See Sharable locks in smp.html.
Class, multiprocessing package
This error is signalled when recursive or repeated locking is not allowed.
See Sharable locks in smp.html.
Class, multiprocessing package
This error is signalled when an attempt is made to unlock a lock that is not locked, or not owned by the current process.
See Sharable locks in smp.html.
Class, multiprocessing package
This class is no longer supported.
Copyright (c) Franz Inc. Lafayette, CA., USA. All rights reserved.
|
Allegro CL version 11.0 |