tencentyun / cos-cpp-sdk-v5

MIT License
56 stars 46 forks source link

Fixes #79 #81

Closed shurunxuan closed 3 years ago

shurunxuan commented 3 years ago

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.