[ Advanced Control and Suspensions | Reference Manual | Alphabetic Index ]

merge_suspension_lists(+Pos1, +Attr1, +Pos2, +Attr2)

Destructively merge the suspension list on Pos1 in structure Attr1 into the suspension list on Pos2 in structure Attr2.
Pos1
Integer indicating the position of the suspension list.
Attr1
Compound term, typically a variable's attribute.
Pos2
Integer indicating the position of the suspension list.
Attr2
Compound term, typically a variable's attribute.

Description

This predicate is used to merge two suspension lists. The list in Attr1 remains unaffected but the list in Attr2 is replaced by the merge of the two lists.

Suspension lists should be regarded an opaque data structure and only be accessed and manipulated by the set of primitives provided for this purpose.

Modes and Determinism

Exceptions

(4) instantiation fault
Pos1, Pos2, Attr1 or Attr2 is not instatiated.
(5) type error
Pos1 or Pos2 is not an integer.
(5) type error
Attr1 or Attr2 is not a structure or has no suspension list on the indicated argument position.
(6) out of range
Attr1 or Attr2 does not have a Position'th argument.

Examples




See Also

insert_suspension / 3, insert_suspension / 4, schedule_suspensions / 2, init_suspension_list / 2, enter_suspension_list / 3