A string or
If mailbox is empty and timeout is
mailbox-wait blocks until an object is placed in mailbox. If mailbox is empty and timeout is a non-negative
mailbox-wait blocks until an object is placed in mailbox or timeout seconds have passed. If there is no object after timeout seconds, then
nil. Once there is an object in mailbox,
mailbox-wait does not remove the object from the mailbox, in contrast to mailbox-read which does.
Note that if there are multiple processes reading from mailbox, another process may read the object from it, so the result of
mailbox-wait is reliable only if you know that the current process is the only process that may read from the mailbox.
"Waiting for message in #<Mailbox...>"
and will be the value returned by process-whostate while
mailbox-wait is blocking.
mailbox-wait arranges for immediate notification when an object is placed in mailbox (unless other processes ware waiting too, in which case one of the processes is notified immediately). It is therefore better than using process-wait with mailbox-not-empty-p because it does not rely on the scheduler to wake it up. It is also less expensive because does not add work to the scheduler.
LispWorks User Guide and Reference Manual - 20 Sep 2017