[ Type Testing | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic 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.

### Modes and Determinism

- is_suspension(?) is semidet

### Fail Conditions

Fails if Term is not a sleeping suspension

## Examples

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

    Fail:
          is_suspension(X).

          is_suspension(a).

          make_suspension(true, 2, S), schedule_suspensions(1, s(S)),
          wake, is_suspension(S).

## See Also

type_of / 2, make_suspension / 3, schedule_suspensions / 2, suspensions / 1, suspensions / 2