LispWorks User Guide and Reference Manual > 35 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 mailbox-read function 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 (or the string "Waiting for message" if wait-reason is nil ) and the timeout argument are both passed to process-wait-with-timeout.

The default value of wait-reason is nil and the default value of timeout is nil .

See also

mailbox-empty-p
mailbox-peek
mailbox-send
mailbox-wait-for-event
make-mailbox
process-wait-with-timeout


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex