POCO with C++11 Threads

A general discussion forum.
Posts: 2
Joined: 07 Jan 2014, 23:32

POCO with C++11 Threads

Postby CryptoKnight » 08 Jan 2014, 00:03

I'm part of a team that's evaluating various C++ libraries for use on a new project. None of us have used POCO before, but we've read through much of the documentation and like what we see very much. At the same time, we'd like to start using some core C++11 features, including the new threading and synchronization primitives, in order to keep our skills up to date. We're wondering, has anyone experienced problems mixing the two (e.g. thread-safe/thread-aware POCO classes like NotificationQueue and ThreadLocal with C++11 thread management)? Are we crazy for considering such a Frankenstein? Our initial implementation will be on Windows (VS2013) and eventually be ported to Linux and OSX, if that's any help.

I apologize if a question like this has already been asked and answered. This forum engine doesn't seem to like the search term "C++11".

Posts: 1266
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: POCO with C++11 Threads

Postby guenter » 08 Jan 2014, 10:47

Generally, mixing C++11 and POCO threads should not be an issue; however, you'll have to keep a few issues in mind:

[*]POCO thread locals (Poco::ThreadLocal) will only work within POCO threads
[*]you cannot use any of the static Poco::Thread methods in non-POCO threads (e.g., Thread::current() will return a null pointer in a non-POCO thread)
[*]you cannot use current thread name and ID in the logger in non-POCO threads

Synchronization primitives can be mixed freely.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest