[ Advanced Control and Suspensions | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
trigger(+Trigger)
Wake the suspensions associated with the symbolic trigger Trigger
until there are no more left.
- +Trigger
- An atom.
Description
Suspensions in ECLiPSe go through several stages: They are created,
attached to variables or symbolic triggers, later scheduled for execution,
and finally executed.
The task of trigger/1 is to take suspensions from the
global suspension list associated to the symbolic name Trigger, and
schedule them for execution. The suspensions are inserted into a
global priority list, according to their individual priority. A
subsequent wake/0 will then actually execute them.
If no suspensions are associated to Trigger, trigger/1
just succeeds and does nothing.
Fail Conditions
None.
Resatisfiable
No.
Examples
[eclipse 1]: suspend(writeln(world), 2, trigger(hello)), trigger(hello).
world
yes.
See Also
demon / 1, attach_suspensions / 2, make_suspension / 3, suspend / 3