I have a thread stopped taking a critical section. The critical section does not have any thread owning, the only strange thing is that LockCount is -3.
- LockCount -3
- RecursionCount 0
- OwningThread 0
- LockSemaphore dfc
- SpinCount 10000
Inside debug info the ContentionCount is 1.
How can I get a lockCount of -3? any idea?
Thank you.
Yes. You released it more times than you acquired it. It's a good idea to use a scoped guard to auto-release it. Then you don't have to worry about multi release.