为什么TCriticalSecion 不起作用? (300分)

  • 主题发起人 张国龙
  • 开始时间

张国龙

Unregistered / Unconfirmed
GUEST, unregistred user!
我在Acquire 之后 还可以 进去。
 
贴出你的代码.
 
这种问题我也碰到过, 应该是同一个线程中可以多次调用Acquire, 增加引用计数
但别的线程不想,它内部用 ThreadId 来区别。
 
Once a thread has ownership of a critical section, it can make
additional calls to EnterCriticalSection or TryEnterCriticalSection
without blocking its execution. This prevents a thread from
deadlocking itself while waiting for a critical section that it
already owns.
 
多谢执教
 
顶部