Generic FunctionPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
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:

  1. Creates a new process-pool-work-item if the work argument is nil, or modfies the process-pool-work-item specified by the work argument.
  2. Processes that work-item if possible. Processing means running it in the pool specified by the pool argument if that pool has an available idle process or can create a new process, or queueing it in that pool if no idle process is available. If there is no idle process and the queue is full (see process-pool-work-limit which specifies the maximum queue size), then nothing is further is done to the work-item.

Two values are returned:

  1. The result of attempting to run or queue the work item. This returned value is one of: :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).
  2. The newly-created or modified process-pool-work-item. While this operator does typically modify work-items passed in as the value of the work argument, it can return the work-item unmodified if the keyword arguments passed in do not necessitate modification. If the first value is 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:

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.