Returns the first object in a mailbox.
mp
mailbox-peek mailbox => result, value-p
| mailbox⇩ | 
A mailbox. | 
| result⇩ | 
Any object or  nil. | 
| value-p⇩ | tornil. | 
The function mailbox-peek returns the first object in the mailbox without removing it. If the mailbox is empty, nil is returned.
If the mailbox mailbox is not empty, the function mailbox-peek returns the first object in the mailbox without removing it. The second returned value value-p is t.
If mailbox is empty, both return values result and value-p are nil.
mailbox-peek needs to lock the mailbox, which means it is significantly slower than mailbox-not-empty-p, and also may affect other processes. In most cases, mailbox-not-empty-p is sufficient and hence is preferable.
mailbox-empty-p
mailbox-not-empty-p
mailbox-send
mailbox-read
make-mailbox
19.6.3 Communication between processes and synchronization
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:51