[ Obsolete | Reference Manual | Alphabetic Index ]
Change the priority of the suspended goal Susp to Priority.
- A variable
- A small integer
This built-in predicate is obsolete!
Every suspended goal has an associated priority. The initial priority
is specified when the suspension is created with make_suspension/3.
The priority can be changed anytime, but when the suspension has
already been scheduled for execution (by schedule_suspensions/2),
the change has no effect on this already scheduled execution.
Changing priorities is most useful for demons (where the same
suspension is used for arbitrary many wakings) and where one might
like to vary its urgency. Typically, the cheaper a goal is, and
the more likely it is to fail or to produce useful information,
the higher should it priority be. However, the relative priorities
of other suspended goals must be kept in mind as well.
Note that a suspension is not a standard Prolog data structure and can
only be manipulated in a restricted way.
Modes and Determinism
- set_suspension_priority(+, +) is det
- (4) instantiation fault
- Susp or Priority are not instantiated.
- (5) type error
- Susp is not a live suspension or Priority is not an integer.
- (6) out of range
- Priority is not a valid priority.
set_suspension_data / 3, demon / 1, is_suspension / 1, kill_suspension / 1, make_suspension / 3, schedule_suspensions / 2, suspension_to_goal / 3