Author: James CE Johnson

ACE Tutorial 011
Passing non-trivial data through an ACE_Message_Queue

Let's take a look at this new program's output:

    [jcej@chiroptera 011]$./message_queue 4 2
    (12108|1024) Task ctor 0xbffff9c8
    (12108|2050) Task 0xbffff9c8 starts in thread 2050
    (12108|1025) Task 0xbffff9c8 starts in thread 1025
    (12108|1024) DataBase ctor 0xbffff9c0
    (12108|1024) Data ctor 0xbffff9c0 for message 0
    (12108|1024) Block ctor 0x8052d08
    (12108|1024) Data dtor 0xbffff9c0
    (12108|1024) DataBase dtor 0xbffff9c0
    (12108|1024) DataBase ctor 0xbffff9c0
    (12108|1024) Data ctor 0xbffff9c0 for message 1
    (12108|1024) Block ctor 0x8052e00
    (12108|1024) Data dtor 0xbffff9c0
    (12108|1024) DataBase dtor 0xbffff9c0
    (12108|1024) DataBase ctor 0xbffff9c0
    (12108|1024) Data ctor 0xbffff9c0 for message 2
    (12108|1024) Block ctor 0x8052ef8
    (12108|1024) Data dtor 0xbffff9c0
    (12108|1024) DataBase dtor 0xbffff9c0
    (12108|1024) DataBase ctor 0xbffff9c0
    (12108|1024) Data ctor 0xbffff9c0 for message 3
    (12108|1024) Block ctor 0x8052ff0
    (12108|1024) Data dtor 0xbffff9c0
    (12108|1024) DataBase dtor 0xbffff9c0
    (12108|1024) Block ctor 0x80530e8
    (12108|1025) Block 0x8052d08 contains (This is message 0.)
    (12108|1025) DataBase ctor 0xbf9ffe20
    (12108|1025) Data ctor 0xbf9ffe20
    (12108|1025) DataBase instance 0xbf9ffe20
    (12108|1025) I am a Data object for message 0
    (12108|1025) Block dtor 0x8052d08
    (12108|1025) Data dtor 0xbf9ffe20
    (12108|1025) DataBase dtor 0xbf9ffe20
    (12108|1025) Block 0x8052e00 contains (This is message 1.)
    (12108|1025) DataBase ctor 0xbf9ffe20
    (12108|1025) Data ctor 0xbf9ffe20
    (12108|1025) DataBase instance 0xbf9ffe20
    (12108|1025) I am a Data object for message 1
    (12108|1025) Block dtor 0x8052e00
    (12108|1025) Data dtor 0xbf9ffe20
    (12108|1025) DataBase dtor 0xbf9ffe20
    (12108|1025) Block 0x8052ef8 contains (This is message 2.)
    (12108|1025) DataBase ctor 0xbf9ffe20
    (12108|1025) Data ctor 0xbf9ffe20
    (12108|1025) DataBase instance 0xbf9ffe20
    (12108|1025) I am a Data object for message 2
    (12108|1025) Block dtor 0x8052ef8
    (12108|1025) Data dtor 0xbf9ffe20
    (12108|1025) DataBase dtor 0xbf9ffe20
    (12108|1025) Block 0x8052ff0 contains (This is message 3.)
    (12108|1025) DataBase ctor 0xbf9ffe20
    (12108|1025) Data ctor 0xbf9ffe20
    (12108|1025) DataBase instance 0xbf9ffe20
    (12108|1025) I am a Data object for message 3
    (12108|2050) Task close 0xbffff9c8
    (12108|1025) Block dtor 0x8052ff0
    (12108|1025) Data dtor 0xbf9ffe20
    (12108|1025) DataBase dtor 0xbf9ffe20
    (12108|1025) Task close 0xbffff9c8
    (12108|1024) Task dtor 0xbffff9c8
    (12108|1024) Block dtor 0x80530e8
    (12108|1024) Application exiting
    [jcej@chiroptera 011]$

Other than being more verbose because of the Data object, this shows us the same thing we've seen before.

[Tutorial Index] [Continue This Tutorial]