A suspension can be in three states:
State Printed as --------------------------------- sleeping 'SUSP-_123-susp' scheduled 'SUSP-_123-sched' dead 'SUSP-_123-dead'
The Prio argument determines the priority with which the Goal will be scheduled when woken. It can be a positive number between 1 and 12, or zero, in which case the priority defaults to the priority setting of the predicate which is called in Goal.
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 an atom although it gets printed by default in the form 'SUSP-_123-susp'. The only way to create a suspension is with make_suspension/3,4, suspend/3,4 or by copying an existing suspension. The contents of a suspension can only be retrieved using get_suspension_data/3.
[eclipse 1]: make_suspension(writeln(hello), 1, S), suspensions(Ss). S = 'SUSP-_264-susp' Ss = ['SUSP-_264-susp'] Delayed goals: writeln(hello) Yes (0.00s cpu) [eclipse 2]: make_suspension(true, 3, S), is_suspension(S), type_of(S,T). S = 'SUSP-_272-susp' T = goal Delayed goals: true Yes (0.00s cpu)