The documentation says that setting maximum threads to 0 will cause the Poco::Net::TCPServerDispatcher to take the provided ThreadPool's capacity():
https://github.com/pocoproject/poco/blob/develop/Net/include/Poco/Net/TCPServerParams.h#L72
Unfortunately, the poco_assert checks poco_assert (count > 0); preventing the user from setting count == 0.
https://github.com/pocoproject/poco/blob/develop/Net/src/TCPServerParams.cpp#L54
It seems the solution should be to change it to:
poco_assert (count >= 0);