[ ECLiPSe Control built-in.|Group Index|
Full Index]
make_suspension(+Goal, +Prio, -Susp, +Module)
Make Goal from module Module a suspended goal with waking priority Prio and
return the corresponding suspension object in Susp.
- +Goal
- A Prolog Goal.
- +Prio
- A small integer.
- -Susp
- A variable.
- +Module
- An atom.
Description
The goal Goal from module Module is made a suspended goal, i.e. it
enters the suspended part of the resolvent and shows up as a delayed
goal. When the debugger is on, a DELAY port is generated.
Note that a suspension is not a standard Prolog data structure and can
only be manipulated in a restricted way. In particular, a suspension is
not a term with functor 'GOAL' or 'WOKEN GOAL' although it is printed
this way by default. The only way to create a suspension is with
make_suspension/2 or by copying an existing suspension.
Fail Conditions
None.
Resatisfiable
No.
Exceptions
- (5) Type error
- Goal is not a callable term.
- (5) Type error
- Susp is not a variable.
- (5) Type error
- Prio is not an integer.
- (5) Type error
- Module is not an atom.
- (6) Range error
- Prio is not a valid priority.
- (60)
- Goal refers to an undefined precedure.
Examples
See Also
insert_suspension / 4, is_suspension / 1, make_suspension / 3, schedule_suspensions / 1, schedule_suspensions / 2, suspension_to_goal / 3, wake / 0