• 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

/usr/lib/swipl/library/thread.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl -- Read utilities
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • quasi_quotations.pl
      • url.pl
      • www_browser.pl
      • prolog_colour.pl
      • record.pl
      • prolog_xref.pl
      • occurs.pl
      • ordsets.pl -- Ordered set manipulation
      • assoc.pl
      • ugraphs.pl
      • solution_sequences.pl
      • atom.pl
      • prolog_pack.pl
      • git.pl
      • ctypes.pl
      • utf8.pl
      • base64.pl
      • persistency.pl
      • pure_input.pl
      • nb_set.pl
      • aggregate.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • iostream.pl -- Utilities to deal with streams
      • dialect.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • yall.pl
      • prolog_code.pl -- Utilities for reasoning about code
      • dif.pl -- The dif/2 constraint
      • thread.pl -- 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
        • call_in_thread/3
      • predicate_options.pl
      • rbtrees.pl
      • nb_rbtrees.pl
      • sandbox.pl
      • prolog_format.pl
      • random.pl
      • pprint.pl
      • modules.pl
      • lazy_lists.pl
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • dicts.pl
      • heaps.pl
      • backcomp.pl -- Backward compatibility
      • date.pl
      • prolog_profile.pl
      • listing.pl
      • quintus.pl
      • oset.pl
      • varnumbers.pl
      • tables.pl
      • charsio.pl
      • terms.pl
      • make.pl
      • streams.pl
      • rwlocks.pl
      • threadutil.pl -- Interactive thread utilities
      • wfs.pl
      • prolog_stack.pl -- Examine the Prolog stack
      • check.pl -- Consistency checking
      • intercept.pl -- Intercept and signal interface
      • prolog_coverage.pl
      • prolog_debug.pl
      • increval.pl
      • help.pl -- Text based manual
      • portray_text.pl
      • statistics.pl -- Get information about resource usage
      • optparse.pl
      • ansi_term.pl
      • hashtable.pl
      • coinduction.pl
      • qsave.pl
      • zip.pl
      • prolog_history.pl
      • codesio.pl
      • shell.pl
      • when.pl -- Conditional coroutining
      • system.pl -- System utilities
      • prolog_jiti.pl
      • prolog_codewalk.pl -- Prolog code walker
      • exceptions.pl
      • base32.pl
      • sort.pl
 concurrent_maplist(:Goal, +List) is semidet
 concurrent_maplist(:Goal, +List1, +List2) is semidet
 concurrent_maplist(:Goal, +List1, +List2, +List3) is semidet
Concurrent version of maplist/2. This predicate uses concurrent/3, using multiple worker threads. The number of threads is the minimum of the list length and the number of cores available. The number of cores is determined using the prolog flag cpu_count. If this flag is absent or 1 or List has less than two elements, this predicate calls the corresponding maplist/N version using a wrapper based on once/1. Note that all goals are executed as if wrapped in once/1 and therefore these predicates are semidet.

Note that the the overhead of this predicate is considerable and therefore Goal must be fairly expensive before one reaches a speedup.

ClioPatria (version V3.1.1-59-g7b9a7a3)