[det]pengine_event_loop(:Closure,
+Options)Starts an event loop accepting event terms sent to the current pengine
or thread. For each such event E, calls ignore(call(Closure, E))
.
A closure thus acts as a handler for the event. Some events are
also treated specially:
- create(ID, Term)
- The ID is placed in a list of active pengines.
- destroy(ID)
- The ID is removed from the list of active pengines. When the
last pengine ID is removed, the loop terminates.
- output(ID, Term)
- The predicate pengine_pull_response/2
is called.
Valid options are:
- autoforward(+To)
- Forwards received event terms to slaves. To is either
all
,
all_but_sender
or a Prolog list of NameOrIDs. [not yet
implemented]