[Mono-dev] System.Threading.Monitor.IsEntered? Will this be implemented?
"Andrés G. Aragoneses"
knocte at gmail.com
Wed Dec 11 10:43:33 UTC 2013
Seems very straightforward to implement. If I were you I would just have
a crack at it, and propose it as a pull request. It's the best way to
On 10/12/13 00:50, vbguy81 wrote:
> I have a project in .NET 4.5 that utilizes Monitor.IsEntered to check if
> there is still a lock on a particular reference. You can lock multiple times
> by doing something like the following.
> //..Do something..
> //there is still a lock.
> As a precaution, when an exception is thrown, I'll loop over MyLock with
> Monitor.Exit until IsEnter() returns false. In some of my more complicated
> Multi-threaded programs the reference and at times these can get locked
> twice (Try to avoid this, but it happens). For me, using Monitor.IsEntered
> is an easy way to make sure everything gets cleaned up.
> In Thread.cs, I found the following:
> #if NET_4_5
> public static bool IsEntered (object obj)
> throw new NotImplementedException ();
> Does anyone have a timeline when this might be implemented?
> View this message in context: http://mono.1490590.n4.nabble.com/System-Threading-Monitor-IsEntered-Will-this-be-implemented-tp4661494.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list