Multithreaded CLI developers: let your users configure the number of threads.
Entire classes of use cases are hiding inside that will make your life easier as a dev -- and threads=1
is usually not hard to add.
One example: if your multithreaded tool works significantly faster on a single file when I force your tool to just use a single thread and parallelize it with parallel --pipepart --block
instead, then either:
you might decide to develop sharding the I/O of the physical file yourself, or
you might consciously decide to not develop it, and leave that complexity to
parallel
(which is fine!)
But if your tool has no threads=N
option, I have no workaround.
Configurable thread count lets me optimize in the meantime (or instead).