A.54 library(thread): High level thread primitives
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(thread): High level thread primitives
          • concurrent/3
          • concurrent_forall/2
          • concurrent_forall/3
          • concurrent_and/2
          • concurrent_and/3
          • concurrent_maplist/2
          • concurrent_maplist/3
          • concurrent_maplist/4
          • first_solution/3
          • call_in_thread/2
    • Packages
Availability::- use_module(library(thread)).(can be autoloaded)
Source[semidet]call_in_thread(+Thread, :Goal)
Run Goal as an interrupt in the context of Thread. This is based on thread_signal/2. If waiting times out, we inject a stop(Reason) exception into Goal. Interrupts can be nested, i.e., it is allowed to run a call_in_thread/2 while the target thread is processing such an interrupt.

This predicate is primarily intended for debugging and inspection tasks.