-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Hi all, I really don't know how to classify this, I write it down just to let you know and try to save some debug time.
I found a different behavior in tryJoin posix version and windows version.
Probably it's not a common use and probably a fix will break some compatibility or portability, that is:
Poco::Thread t;
t.startFunc([]{});
WINDOWS:
bool ret1 = t.tryJoin(1000) ; return true
bool ret2 = t.tryJoin(1000) ; return true
LINUX:
bool ret1 = t.tryJoin(1000) ; return true
bool ret2 = t.tryJoin(1000) ; return false
this because _pData->started it's never set to false after join, it's only set to true in start function
Probably the correct behavior is to do like windows style but I understand can be a breaking change even if probably it's not a problem in most application, just be careful if you rely on return code