ACE Tutorial 016
Making ACE_Condition easier to use


The ACE framework has quite a few objects for syncronizing your threads and even processes. We've mentioned a few in passing already: ACE_Thread_Mutex and ACE_Barrier for instance.

Another interesting one is the ACE_Condition template. By using an ACE_Condition you can have your code wait for an arbitrary condition to occur. That condition is "embodied" in a variable of your choice. That variable can, in turn, be any data type you wish. This makes ACE_Condition much more flexible than a simple mutex, barrier or semaphore.

In this tutorial, I'll create a wrapper class around the ACE_Condition and the assorted housekeeping items necessary to make it work. I'll use a simple integer as the condition variable but keep in mind that you can use any data type you want.

Kirthika's abstract:


[Tutorial Index] [Continue This Tutorial]