. .

Tag: events

0

Threading events and Intel Building Blocks

The Intel Threading Building Blocks library (TBB) is a useful cross-platform C++ library, which contains many high and low level tools for developing multi-threaded applications. One feature I required but couldn’t find in TBB is a class similar to AutoResetEvent in the .NET framework. That class allows simple synchronization of two threads. One of them is waiting the event to be triggered, while the other triggers the event at a point. I have implemented this class in C++, using atomic operations from TBB, which guaranties that if the two threads are running on different cores, then their caches get synced