If you are using shared memory (and not something else) it looks as if you need thread notification (wait(), notify()). One application is a producer-consumer pattern.Can you describe the model problem you want to solve? It would make it easier. Describe how data is created, by whom , when, when and by whom accessed. These questions will lead to an answer.Threads are asynchronous/independent units by definition but the term is more usual with non shared memory imo. PC pattern is described herehttp://www.quantnet.com/cplusplus-multithreading-boost/
QuoteMy code is about network flow. Each thread runs a task of a node. OK, I see. What about Boost asio? Basically, you can use connnected and reliable TCP or connectionless unreliable UDP between client and server.