[ ECLiPSe Type Testing built-in.|Group Index| Full Index]

is_suspension(?Term)

Succeeds if Term is a sleeping suspension.

?Term
Prolog term.

Description

Used to test whether Term is a sleeping suspension, i.e. a suspension that has not yet been executed. type_of/2 can be used to test for a sleeping or executed suspension.

Fail Conditions

Fails if Term is not a sleeping suspension.

Resatisfiable

No.

Exceptions

Examples


Success:
      make_suspension(true, 2, S), is_suspension(S).

Fail:
      is_suspension(X).

      is_suspension(a).

      make_suspension(true, 2, S), schedule_woken([S]),
      wake, is_suspension(S).


See Also

type_of / 2, make_suspension / 3, schedule_woken / 1