37 A message queue is a reference counted object, being derived from <codeph>CObject</codeph>, |
37 A message queue is a reference counted object, being derived from <codeph>CObject</codeph>, |
38 which means that it is not persistent; it is deleted when the last handle |
38 which means that it is not persistent; it is deleted when the last handle |
39 to it is closed. The queue itself is simply a block of memory divided into |
39 to it is closed. The queue itself is simply a block of memory divided into |
40 slots, managed by the <codeph>DMsgQueue</codeph> object. </p> |
40 slots, managed by the <codeph>DMsgQueue</codeph> object. </p> |
41 <fig id="GUID-BDA4A786-57B2-529D-BDFB-72D2B2B30670"> |
41 <fig id="GUID-BDA4A786-57B2-529D-BDFB-72D2B2B30670"> |
42 <image href="GUID-7C061090-83A8-5E0F-B42B-2D722BE054EE_d0e246744_href.png" placement="inline"/> |
42 <image href="GUID-7C061090-83A8-5E0F-B42B-2D722BE054EE_d0e243007_href.png" placement="inline"/> |
43 </fig> |
43 </fig> |
44 <section id="GUID-1D2EF848-8068-56B9-850B-56AE88E192DE"><title>Handle to a |
44 <section id="GUID-1D2EF848-8068-56B9-850B-56AE88E192DE"><title>Handle to a |
45 message queue</title> <p>A message queue is created, opened, written to and |
45 message queue</title> <p>A message queue is created, opened, written to and |
46 read from through a message queue handle, an <xref href="GUID-5195B8D1-851E-3BEE-A72D-1841C0937300.dita"><apiname>RMsgQueue</apiname></xref> object. |
46 read from through a message queue handle, an <xref href="GUID-5195B8D1-851E-3BEE-A72D-1841C0937300.dita"><apiname>RMsgQueue</apiname></xref> object. |
47 This is a templated class, where the template parameter defines the message |
47 This is a templated class, where the template parameter defines the message |
48 type. </p> <p> <xref href="GUID-5195B8D1-851E-3BEE-A72D-1841C0937300.dita"><apiname>RMsgQueue</apiname></xref> is derived from <xref href="GUID-2DCEE7F5-9EA3-3546-8779-7299318176E2.dita"><apiname>RMsgQueueBase</apiname></xref>, |
48 type. </p> <p> <xref href="GUID-5195B8D1-851E-3BEE-A72D-1841C0937300.dita"><apiname>RMsgQueue</apiname></xref> is derived from <xref href="GUID-2DCEE7F5-9EA3-3546-8779-7299318176E2.dita"><apiname>RMsgQueueBase</apiname></xref>, |
49 which together form a thin template class/base class pair. <codeph>RMsgQueueBase</codeph> provides |
49 which together form a thin template class/base class pair. <codeph>RMsgQueueBase</codeph> provides |
50 the implementation, while <codeph>RMsgQueue</codeph> provides type safety. |
50 the implementation, while <codeph>RMsgQueue</codeph> provides type safety. |
51 An <codeph>RMsgQueueBase</codeph> object is a valid message queue handle, |
51 An <codeph>RMsgQueueBase</codeph> object is a valid message queue handle, |
52 but does not offer the type safety that <codeph>RMsgQueue</codeph> does. </p> <fig id="GUID-B9685695-0E07-5CC1-AFED-0ABF4DC93ACB"> |
52 but does not offer the type safety that <codeph>RMsgQueue</codeph> does. </p> <fig id="GUID-B9685695-0E07-5CC1-AFED-0ABF4DC93ACB"> |
53 <image href="GUID-2F6EF388-CA87-5AAD-A4C5-37FC3CE15331_d0e246783_href.png" placement="inline"/> |
53 <image href="GUID-2F6EF388-CA87-5AAD-A4C5-37FC3CE15331_d0e243046_href.png" placement="inline"/> |
54 </fig> <p>Message queues are used for one-way, one to one communications only. |
54 </fig> <p>Message queues are used for one-way, one to one communications only. |
55 The message queue is therefore unicast. If there are multiple readers of the |
55 The message queue is therefore unicast. If there are multiple readers of the |
56 message queue only one will receive the message. </p> </section> |
56 message queue only one will receive the message. </p> </section> |
57 <section id="GUID-910216A9-EE2D-5C45-8AB3-E1CBEF3B7514"><title>Visibility |
57 <section id="GUID-910216A9-EE2D-5C45-8AB3-E1CBEF3B7514"><title>Visibility |
58 of a message queue</title> <p>A message queue can be: </p> <ul> |
58 of a message queue</title> <p>A message queue can be: </p> <ul> |