Availability:built-in
thread_peek_message(?Term)Examines the thread message queue and compares the queued terms with Term 
until one unifies or the end of the queue has been reached. In the first 
case the call succeeds, possibly instantiating
Term. If no term from the queue unifies, this call fails. 
I.e.,
thread_peek_message/1 
never waits and does not remove any term from the queue. See also thread_get_message/3.