How to test if a thread is holding a lock on an object in C#?

Posted by theburningmonk on Stack Overflow See other posts from Stack Overflow or by theburningmonk
Published on 2010-03-09T09:37:06Z Indexed on 2010/03/09 10:06 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

Hi,

Is there a way to test if the current thread is holding a monitor lock on an object? I.e. an equivalent to the Thread.holdsLock in Java.

Thanks,

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET