XlTQOps.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, March 11, 1991 4:15:00 pm PST
Christian Jacobi, August 28, 1991 11:35 am PDT
XlTQOps: CEDAR DEFINITIONS
~ BEGIN
A random collection of useful ThreadQueue operators for Xl.
EnqueueSoon:
PROC [ms:
INT ¬ 0, tq: Xl.
TQ, proc: Xl.EventProcType, data:
REF ¬
NIL, event: Xl.Event ¬
NIL];
Like Xl.Enqueue but delayed by approximatively ms millliseconds.
Time delay like in DelayedFork.ForkSoon.
This is useful for implementing timeouts on expected events {e.g. for ICCCM selections).
CountProcs:
PROC [tq: Xl.
TQ]
RETURNS [
CARD];
Returns current sum of procedures executing + procedures waiting for a TQ
This number can change anytime
END.