A.55 library(thread_pool): Resource bounded thread management
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(thread_pool): Resource bounded thread management
          • thread_pool_create/3
          • thread_pool_destroy/1
          • current_thread_pool/1
          • thread_pool_property/2
          • thread_create_in_pool/4
          • worker_exitted/3
          • create_pool/1
    • Packages
Availability::- use_module(library(thread_pool)).(can be autoloaded)
Source[det]thread_create_in_pool(+Pool, :Goal, -Id, +Options)
Create a thread in Pool. Options overrule default thread creation options associated to the pool. In addition, the following option is defined:
wait(+Boolean)
If true (default) and the pool is full, wait until a member of the pool completes. If false, throw a resource_error.
Errors
- resource_error(threads_in_pool(Pool)) is raised if wait is false or the backlog limit has been reached.
- existence_error(thread_pool, Pool) if Pool does not exist.