Focus on ACE

订阅 ace-china
电子邮件:
浏览存于 groups.google.com 上的所有帖子

C++博客 首页 新随笔 联系 聚合 管理
  64 Posts :: 3 Stories :: 22 Comments :: 0 Trackbacks

感谢您的回复
的确太低级别了,这是我对操作系统不熟悉造成的.
有的操作系统,如win32,系统默认实现的是递归锁,有的则不是,如Solaris.

下面是取自ace注释

/**
* @class ACE_Thread_Mutex
*
* @brief ACE_Thread_Mutex wrapper (only valid for threads in the same
* process).
*
* This implementation is optimized for locking threads that are
* in the same process. It maps to <CRITICAL_SECTION>s on NT
* and <ACE_mutex_t> with <type> set to <USYNC_THREAD> on UNIX.
* ACE_Thread_Mutex is recursive on some platforms (like
* Win32). However, on most platforms (like Solaris) it is not
* recursive. To be totally safe and portable, developers
* should use ACE_Recursive_Thread_Mutex when they need a
* recursive mutex.
*/

 

posted on 2006-07-12 15:25 Stone Jiang 阅读(2502) 评论(1)  编辑 收藏 引用 所属分类: ACE

Feedback

# re: 关于ACE_Thread_Mutex的回复 2006-07-14 08:26 alvin.msg@gmail.com
实际上这个问题的答案是不确定的,会造成程序在不同平台的差异!其实我用ACE的时候,看注释可以帮助理解,实在不理解就去看看具体实现,和调用的平台api接口,其实一般都可以找到答案的,可能会费点事了。(继续加油~)  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理