PublicShow sourcethreadutil.pl -- Interactive thread utilities

This library provides utilities that are primarily intended for interactive usage in a threaded Prolog environment. It allows for inspecting threads, manage I/O of background threads (depending on the environment) and manipulating the debug status of threads.

Sourcethreads
List currently known threads with their status.
Sourcejoin_threads
Join all terminated threads.
Sourceinteractor
Run a Prolog toplevel in another thread with a new console window.
Sourcethread_has_console is semidet
True when the calling thread has an attached console.
See also
- attach_console/0
Sourceattach_console is det
Create an xterm-console and make the standard Prolog streams point to it.
Sourcexterm_args(-List) is nondet[multifile]
Multifile and dynamic hook that provides (additional) arguments for the xterm(1) process opened for additional thread consoles. Each solution must bind List to a list of atomic values. All solutions are concatenated using append/2 to form the final argument list.

The defaults set the colors to black-on-light-yellow, enable a scrollbar, set the font using Xft font pattern and prepares the back-arrow key.

Sourcetspy(:Spec) is det
Sourcetspy(:Spec, +ThreadId) is det
Trap the graphical debugger on reaching Spec in the specified or any thread.
Sourcetdebug is det
Sourcetdebug(+Thread) is det
Enable debug-mode, trapping the graphical debugger on reaching spy-points or errors.
Sourcetnodebug is det
Sourcetnodebug(+Thread) is det
Disable debug-mode in all threads or the specified Thread.
Sourcetprofile(+Thread) is det
Profile the operation of Thread until the user hits a key.
Sourcetspy(:Spec) is det
Sourcetspy(:Spec, +ThreadId) is det
Trap the graphical debugger on reaching Spec in the specified or any thread.
Sourcetdebug is det
Sourcetdebug(+Thread) is det
Enable debug-mode, trapping the graphical debugger on reaching spy-points or errors.
Sourcetnodebug is det
Sourcetnodebug(+Thread) is det
Disable debug-mode in all threads or the specified Thread.

Undocumented predicates

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

Sourcethread_run_interactor