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.
never waits and does not remove any term from the queue. See also thread_get_message/3.