PublicShow sourcepce_dispatch.pl -- Run XPCE in a separate thread

This module allows one to run XPCE in a separate thread pce. This is especially nice if xpce is only used to support the SWI-Prolog development tools because it ensures that the tools remain responsive while the main thread executes long-running goals.

This module can be deactivated by setting the flag xpce_threaded:

:- set_prolog_flag(xpce_threaded, false).
Source pce_dispatch(+Options) is det
Create a new thread pce that takes care of the XPCE message loop. This predicate has no effect if dispatching is already on another thread than the main. The loop can be ended using pce_end_dispatch/0.
Source pce_end_dispatch is det
End the XPCE dispatcher loop started with pce_dispatch/1.
Source pce_call(:Goal) is det
Run Goal in the XPCE thread.
deprecated
- New code should used in_pce_thread/1.