All Manuals > LispWorks User Guide and Reference Manual > 44 The MP Package

NextPrevUpTopContentsIndex

mailbox-read

Function
Summary

Reads the next object in a mailbox.

Package

mp

Signature

mailbox-read mailbox &optional wait-reason timeout => object, flag

Arguments

mailbox

A mailbox.

wait-reason

A string or nil.

timeout

A non-negative number or nil.

Values

object

An object.

flag

A boolean.

Description

The function mailbox-read returns the next object from the mailbox mailbox, or nil.

If mailbox is empty and timeout is nil, then mailbox-read blocks until an object is placed in mailbox. If mailbox is empty and timeout is a number, then mailbox-read blocks until an object is placed in mailbox or timeout seconds have passed. If the timeout occurs, then mailbox-read returns nil as the first value and also flag is nil. If an object is actually read from the mailbox, then flag is t.

The wait-reason argument defaults to "Waiting for message in #<Mailbox...>" and will be the value returned by process-whostate while mailbox-read is blocking.

The default value of timeout is nil.

See also

mailbox-empty-p
mailbox-peek
mailbox-send
mailbox-wait-for-event
make-mailbox


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex