Do not spawn threads in threadpool_map if configured with a single thread.
The function threadpool_map
should just execute the mapper function directly, as a single chunk.
The function threadpool_map
should just execute the mapper function directly, as a single chunk.