pending/[1,2]

     pending(-Number)
     pending(+Displayable, -Number)
     

Unify Number with the number of events that have been received from the server, but have not been processed yet, for the given Displayable, which if omitted, is the default Display.

If there are no events in the queue, the output buffer is flushed and Number is unified with the number of events transferred to the input queue as a result of the flush.