[ Obsolete | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

cancel_after_event(+Event)

Cancel all pending instances of after event Event.
Event
Atom

This built-in predicate is obsolete!

Description

All instances of the pending after event Event is cancelled so that the event will not be triggered. A pending after event is an event which is setup by either event_after/2, event_after/3 or event_after_every/2, and which is waiting to be raised (event_after_every/2 will always be pending as it is raised repeatedly).

Note that the processing of an already raised, but as yet unprocessed event will not be cancelled by this predicate.

This is equivalent to

	cancel_after_event(Event) :-
	    cancel_after_event(Event, [_|_]).

Modes and Determinism

Fail Conditions

Fails if Event is not a pending after event

Exceptions

(5) type error
Event is not an atom.

Examples

   setup :-
      set_event_handler(hi, hi/0),
      event_after_every(hi, 3.2).

   hi :-
      writeln(hi).

   kill :-
      ( cancel_after_event(hi) ->
          writeln('event cancelled')
      ;
          writeln('no event to cancel')
      ).

See Also

cancel_after_event / 2, event_after / 2, event_after / 3, event_after_every / 2, event / 1, set_event_handler / 2, current_after_events / 1