感谢您的回复
的确太低级别了,这是我对操作系统不熟悉造成的.
有的操作系统,如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.
*/