multithreading - C++ - Passing data between threads -


i have thread pool consists of 4 threads: t1, t2, t3, , t4. running concurrently, input t3 , t4 depends on output t2. how should implement message queue after t2 completes, send output data t3 , t4 processing? have tried implement message queue using locking mechanism, seems locking quite expensive. there lock-free mechanism pass data between threads? using boost::thread in visual studio 2010.

boost has lock-free queue: http://www.boost.org/doc/libs/1_56_0/doc/html/lockfree.html.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -