ACE学习(七)ACE_Message_Queue

本文详细介绍了ACE框架中的ACE_Message_Queue,它模仿了System V STREAMS的消息队列模型,但专注于线程间通信。文章讨论了与System V的区别,基于traits策略的设计,以及ACE_Message_Block的使用,包括其对数据缓存、引用计数和消息类型的管理。此外,还提及了ACE_Message_Block的示例和相关参考资源。
摘要由CSDN通过智能技术生成

ACE_Message_Queue

 

消息队列的使用已经在前面的ACE_Semaphore中使用到了,其中使用的就是它的典型用法。

ACE_Message_Queue

/**
 * @class ACE_Message_Queue
 *
 * @brief A message queueing facility with parameterized synchronization
 * capability. ACE_Message_Queue is modeled after the queueing facilities
 * in System V STREAMs.
 *
 * ACE_Message_Queue is the primary queueing facility for
 * messages in the ACE framework.  It's one template argument parameterizes
 * the queue's synchronization. The argument specifies a synchronization
 * strategy. The two main strategies available for ACE_SYNCH_DECL are:
 *   -# ACE_MT_SYNCH: all operations are thread-safe
 *   -# ACE_NULL_SYNCH: no synchronization and no locking overhead
 *
 * All data passing through ACE_Message_Queue is in the form of
 * ACE_Message_Block objects. @sa ACE_Message_Block.

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值