10.5 library(threadutil): Interactive thread utilities
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Multithreaded applications
        • library(threadutil): Interactive thread utilities
          • threads/0
          • join_threads/0
          • with_stopped_threads/2
          • thread_has_console/0
          • attach_console/0
          • attach_console/1
          • tspy/1
          • tspy/2
          • tdebug/0
          • tdebug/1
          • tnodebug/0
          • tnodebug/1
          • tbacktrace/1
          • tbacktrace/2
          • tprofile/1
          • thread_alias/1
    • Packages
Availability::- use_module(library(threadutil)).(can be autoloaded)
Source[det]tbacktrace(+Thread)
[det]tbacktrace(+Thread, +Options)
Print a backtrace for Thread to the stream user_error of the calling thread. This is achieved by inserting an interrupt into Thread using call_in_thread/2. Options:
depth(+MaxFrames)
Number of stack frames to show. Default is the current Prolog flag backtrace_depth or 20.

Other options are passed to get_prolog_backtrace/3.

bug
call_in_thread/2 may not process the event.