It's not something I've ever needed to do, but the documentation of QueueUserWorkItem implies you can set it when calling that function.
Set max number of threads in the default thread pool
rustyx
1
Reputation point
Is there a way to configure the min and max number of threads for the default thread pool?
SetThreadpoolThreadMaximum
seems to work only for a non-default thread pool (a pool created with CreateThreadpool
):
SetThreadpoolThreadMaximum(NULL, 4);
doesn't work, throws 0xC000000D: An invalid parameter was passed to a service or function.