:- use_module(library(thread_pool)).(can be autoloaded)
true(default) and the pool is full, wait until a member of the pool completes. If
false, throw a resource_error.
resource_error(threads_in_pool(Pool))is raised if wait is
falseor the backlog limit has been reached.
existence_error(thread_pool, Pool)if Pool does not exist.