
delay(?Variables, +Goal)

   Delay the Goal on all variables in the term Variables.



Arguments
   Variables           Any Prolog term.
   Goal                A callable term.

Type
   Obsolete

Description
   The specified goal Goal is made a suspended goal such that it will be
   woken whenever any of the variables in the term Variables is bound (even
   to another variable).  This predicate is obsolete, a more precise
   control over suspending and waking is obtained using make_suspension/3
   and insert_suspension/3,4 and with the suspend.pl library.




Modes and Determinism
   delay(?, +) is det

Exceptions
     4 --- Goal is not instantiated.
     5 --- Goal is not a callable term.
    60 --- Goal does not refer to an existing procedure.

Examples
   
[eclipse 1]: delay(X, writeln(hello)).

X = X

Delayed goals:
        writeln(hello)
yes.
[eclipse 2]: delay(X, writeln(hello)),
        writeln(one),
        X=1,            % causes waking
        writeln(two).
one
hello
two

X = 1
yes.
[eclipse 3]: delay([X,Y], writeln(X)), X=Y.
X

X = X
Y = X
yes.




See Also
   suspend / 3, make_suspension / 3, insert_suspension / 3
