:- use_module(library(thread)).(can be autoloaded)
- Number of threads to use. The default is determined by the Prolog flag cpu_count.
- To be done
- Ideally we would grow the set of workers dynamically, similar to dynamic scheduling of HTTP worker threads. This would avoid creating threads that are never used if Generate is too slow or does not provide enough answers and would further raise the number of threads if Action is I/O bound rather than CPU bound.