boost non-blocking read write routines
Hi, I am coding for data exchange between threads by boost C++. Some threads need to read or write some data structure asynchronously. For example, we have thread 1 and thread 2. When thread 1 needs to get some data from thread 2, if the data is still not available for thread 1, it should not be blocked and can do other things and then go back to check the data again later. The same things are for thread 2. What are the API routines of boost non-blocking read write , which can do that ? I cannot find it in boost document. thanks
I am coding for data exchange between threads by boost C++. Some threads need to read or write some data structure asynchronously. For example, we have thread 1 and thread 2. When thread 1 needs to get some data from thread 2, if the data is still not available for thread 1, it should not be blocked and can do other things and then go back to check the data again later. The same things are for thread 2. What are the API routines of boost non-blocking read write , which can do that ? I cannot find it in boost document. thanks
boost.lockfree might be interesting for you. it has been accepted into boost, and i hope i can import it into svn soon (i am currently waiting for boost.atomic, which has also been accepted, but not merged into trunk, yet). for now you can try the version from my git repository [1]. tim [1] http://tim.klingt.org/git?p=boost_lockfree.git;a=summary
participants (2)
-
Jack Bryan
-
Tim Blechmann