[ Event Handling | Reference Manual | Alphabetic Index ]
Disable the given event
- An event handle
The given event is disabled. A disabled events behaves as if its
handler was the goal 'true':
- Retrieving the goal using event_retrieve/3 returns 'true'
- When the event is raised (e.g. posted via event/1), nothing happens
- If the event gets disabled after it was raised, but before its handler
execution has started, handler execution will be suppressed.
Note that disabling and enabling events are nonlogical operations
which are not undone on backtracking.
Modes and Determinism
- (4) instantiation fault
- EventHandle is un-instantiated
- (5) type error
- EventHandle is not a handle
?- event_create(writeln(hello), , E),
event(E), % does nothing
event_create / 3, event / 1, event_enable / 1, event_retrieve / 3