Using Poco::Thread as a global variable will result in the member function Poco::FastMutex being called before it is actually constructed, resulting in a crash or a deadlock when used in a separate module (for example, a DLL), depending on the target platform.
Since this is not the intended usage, changing the global Poco::TaskManager to lazy-initialized will fix this. It will make sure that the static singleton in Poco initializes before it being used.
Using
Poco::Thread
as a global variable will result in the member functionPoco::FastMutex
being called before it is actually constructed, resulting in a crash or a deadlock when used in a separate module (for example, a DLL), depending on the target platform.Since this is not the intended usage, changing the global
Poco::TaskManager
to lazy-initialized will fix this. It will make sure that the static singleton in Poco initializes before it being used.