Why Poco::Thread::current()->isRunning() crashes?

A general discussion forum.
slamguy
Posts: 5
Joined: 18 Jun 2013, 19:53

Why Poco::Thread::current()->isRunning() crashes?

Postby slamguy » 10 Oct 2013, 17:57

Consider Thread A calling function foo() which in turn is asking whether Thread A is running. And it will crash. Any reason why?

guenter
Posts: 1192
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Why Poco::Thread::current()->isRunning() crashes?

Postby guenter » 23 Oct 2013, 13:17

Thread::current() may return NULL for the main thread, or for threads not created through Poco.

slamguy
Posts: 5
Joined: 18 Jun 2013, 19:53

Re: Why Poco::Thread::current()->isRunning() crashes?

Postby slamguy » 23 Oct 2013, 19:46

Thank you, that explains it.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests