ACE Tutorial 018
The FIFO Nature of ACE_Token

Our main() just keeps getting simpler! I guess that's a good thing.

What we've done is create two Task-derived objects that test different locking mechanisms. The Token object uses ACE_Token and the Mutex object uses ACE_Mutex. When you execute the application you should see quite a difference in thread utilization. At the end of the tutorial I've included a link to the output of a typical run of the application.

// $Id$

// Get our two Test derivatives...
#include "Token_i.h"
#include "Mutex_i.h"

int main(int,char**)
        // See what an ACE_Token does for us.
    Token token;;

        // And now the ACE_Mutex.
    Mutex mutex;;

template class Test_T <ACE_Mutex>;
template class Test_T <ACE_Token>;
template class ACE_Atomic_Op <ACE_Mutex, int>;
#pragma instantiate Test_T <ACE_Mutex>
#pragma instantiate Test_T <ACE_Token>
#pragma instantiate ACE_Atomic_Op <ACE_Mutex, int>

[Tutorial Index] [Continue This Tutorial]