[ Obsolete | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
schedule_woken(+SuspList, +Priority)
Schedule all suspensions in the suspension list SuspList with the priority
Priority.
- +SuspList
- Suspension list or difference list or variable
- +Priority
- Integer
This built-in predicate is obsolete!
Description
This predicate is used to override the priority of all sleeping
suspensions in SuspList and to schedule them with a new priority
Priority.
One possible use of this predicate is to postpone the execution of all
suspensions in a list when they are known to succeed, to make sure that
there will be no floundering goals and that the predicates are not
executed too soon. This is the case e.g. when a variable is
instantiated but this change should not be propagated to related
constraints, because it is known to be redundant.
Fail Conditions
None.
Resatisfiable
No.
Exceptions
- (4) instantiation fault
- Priority is not instantiated.
- (5) type error
- SuspList is not a list nor a difference list nor free.
- (5) type error
- Priority is not an integer.
- (6) out of range
- Priority is less than 1 or greater than 255.
Examples
[eclipse 1]: make_suspension(writeln(hello), 4, S),
make_suspension(writeln('hi there'), 2, T),
schedule_woken([S, T]), wake.
hi there
hello
S = 'WOKEN GOAL'
T = 'WOKEN GOAL'
yes.
[eclipse 2]: make_suspension(writeln(hello), 4, S),
make_suspension(writeln('hi there'), 2, T),
schedule_woken([S, T], 6), wake.
hello
hi there
S = 'WOKEN GOAL'
T = 'WOKEN GOAL'
yes.
See Also
schedule_woken / 1, insert_suspension / 3, insert_suspension / 4, make_suspension / 3, suspension_to_goal / 3, wake / 0