• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.60 library(thread_pool): Resource bounded thread management
All Application Manual Name SummaryHelp

  • 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)).
Source[semidet,multifile]create_pool(+PoolName)
Hook to create a thread pool lazily. The hook is called if thread_create_in_pool/4 discovers that the thread pool does not exist. If the hook succeeds, thread_create_in_pool/4 retries creating the thread. For example, we can use the following declaration to create threads in the pool media, which holds a maximum of 20 threads.
:- multifile thread_pool:create_pool/1.

thread_pool:create_pool(media) :-
    thread_pool_create(media, 20, []).

ClioPatria (version V3.1.1-51-ga0b30a5)