I would like to compile a list of all possible conditions making Monitor go to kernel-mode or use a kernel sync object.

The sync block has a field to reference the kernel object. Hence I deducted that lock will go to kernel-mode sometimes.

I found this: Lock (Monitor) internal implementation in .NET

But it has too many questions to be answered and the only useful information is that the OP answered his own question by simply stating that the lock will go to the kernel-mode sometimes. Also there aren’t any links to anything to support that answer.

When exactly will lock go to kernel-mode (not if and not why - when)?

I am more interested to hear about .NET 4 and 4.5 if there is any difference with older versions.

From the Richter book: "A sync block contains fields for a kernel object, the owning thread’s ID, a recursion count, and a waiting threads count."

Edit
Report