While initializing the thread pool is done lazily (speeding up null builds), it's still all-or-nothing. It would be better if we only initialized threads as needed (returning them to the pool).
This would require moving the job thread pool away from Lparallel. Since we don't use Lparallel's scheduler anyway, the tricky part would be to imitate Lparallel's technique for referring errors from worker threads.
While initializing the thread pool is done lazily (speeding up null builds), it's still all-or-nothing. It would be better if we only initialized threads as needed (returning them to the pool).
This would require moving the job thread pool away from Lparallel. Since we don't use Lparallel's scheduler anyway, the tricky part would be to imitate Lparallel's technique for referring errors from worker threads.