Did you know ... Search Documentation:
Pack logicmoo_base -- prolog/logicmoo/pdt_server/process_observe.pl
PublicShow source
 process_observe(+Thread, +Subject)
Add an observer to a subject.
Thread- the observer, i.e. a thread that is running dispatch/3
Subject- the subject to observe. This term is unified with the subject given as second argument to notify/2.
Key- should be an atom. During notification, if the Subject terms was successfully unified, the key is also passed to the observer. The idea of this is to help observers calling from Java, or otherwise lacking the concept of unification, to recognize the Subject they subscribed for.
 process_unobserve(+Thread, +Subject)
Remove an observer from a subject.
Thread- the observer thread to remove.
Subject- the subject from which to remove the observer.
 process_notify(+Subject, +Event)
Notify all active observers. If observer's thread is stopped it will be removed.
 process_dispatch(-Subject, -Key, -Event)
Recieve events. This predicate is intended to be called by observer threads. It produces solutions for every recieved event, i.e. every time process_notify/2 is called on a subject the observer thread is subscribed for. If it recieves an event for the subject '$stop' it will cut and fail.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 process_observe(Arg1, Arg2, Arg3)