I am currently working on a threadpool implementation myself using a lockfree queue and std::thread however I am using the Joe Seigh atomic queue algorithm rather than the boost version. I can see no reason why the boost version would not be fine, I've examined the source and it seems an excellent implementation to me.
Is it safe to use boost::lockfree with c++11 thread support library?
-
28-06-2022 - |
문제
I currently have a code written using C++ 11 thread support library: http://en.cppreference.com/w/cpp/thread
I am wondering whether it would be safe to mix that code with boost::lockfree. http://www.boost.org/doc/libs/1_54_0/doc/html/lockfree.html
That is, I want multiple C++11 std::threads to concurrently access boost::lockfree::queue. Probably it would be safer to replace C++11 thread with boost::thread, but if I could minimize the code change it would be nice.
해결책
제휴하지 않습니다 StackOverflow