Did you know ... Search Documentation:
Pack xlibrary -- prolog/concurrent_forall.pl
PublicShow source
 concurrent_forall(:Cond, :Action) is semidet
Concurrent version of forall/2. This predicate will prove several alternatives of Cond with Action, using multiple threads. The maximum number of threads defined is the amount of cores available. If the number of pending jobs is greater than the number of workers, then the system will wait until a job is finished before to process the next alternative, this is done to avoid that the alternatives of Cond could overflow the memory.
 concurrent_forall(:Cond, :Action, :Join) is semidet
Join is called after the execution of Action in the main thread. Sometimes we still need to execute a part of the code serialized. Is equivalent to forall(Cond, (Action, ignore(Join))).