Name Type Value ------------------------------------------------------------- priority Integer Waking priority invoc Integer Invocation number (debugging)All modifications are undone on backtracking. Changes to the priority only have an effect the next time the suspension is scheduled (ie changing the priority of an already scheduled suspension has no effect unless it is a demon which can become suspended again). If Susp is a variable or a dead suspension, this predicate silently succeeds, doing nothing.
Note that a suspension is not a standard logical data structure and can only be manipulated in a restricted way. In particular, a suspension cannot be printed (e.g. using writeq/1,2) and then read back, giving a term identical to the one that was printed.
[eclipse 1]: make_suspension(writeln(hello),5,S), set_suspension_data(S, priority, 2), get_suspension_data(S, priority, P). S = 'SUSP-_123-susp' P = 2 Delayed goals: writeln(hello) yes. :- demon d/2. d(X, Susp) :- ( var(S) -> % initial suspend suspend(d(X, Susp), 5, X->constrained, Susp) ; finished(X) -> % terminate kill_suspension(Susp) ; useful(X) -> % raise priority set_suspension_data(Susp, priority, 4) ; % lower priority set_suspension_data(Susp, priority, 6) ).