ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Multithreading with C#
Subject:   Monitor.Enter not working
Date:   2009-02-08 23:31:55
From:   GhanshyamL
Response to: Monitor.Enter not working

Steve, check the thread id in which the Monitor.Enter executes. The Monitor.Exit will succeed only if that call happens on the same thread that obtained the lock. This will fail otherwise.


Maybe Steve will not read this since this seems to be an old post, but this will surely help others, who might read this.


-Ghanshyam