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: page02.html,v 1.5 1999/04/03 21:56:32 jcej Exp $

    // 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;
        token.run();

            // And now the ACE_Mutex.
        Mutex mutex;
        mutex.run();

        return(0);
    }

[Tutorial Index] [Continue This Tutorial]