dequeue

Generic Function

Package: mp

Arguments: queue &key wait whostate

Removes the object at the head of the queued sequence queue, that is, the one that has been queued the longest, and returns that object. If queue is empty, then the result depends on the value of the wait keyword argument. If wait is nil (the default), then an error is signaled. If wait is true, then the process waits until it can successfully dequeue an object from the queue. The predefined method is for the queue class.

Interlocks ensure that no entry in the queue will be retrieved by more than one process (once the dequeuing starts, it will complete). If the process does wait, its whostate will be set from the whostate keyword argument, which defaults to the string "waiting for something".

See Queues (both models) in multiprocessing.htm for more information.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.