[Mono-list] How does Monitor.Enter work?
trampster at gmail.com
Thu Jul 21 01:03:16 EDT 2011
It is unwise to post sections of the .net source code to this mailing list.
As technically anyone who has seen the dotnet framework code can't
contribute to those parts of the mono project. Seeing as most of the mono
developers read this list you may inadvertently stop them from being able to
further develop mono.
See http://mono-project.com/Contributing for more info about these rules.
On Thu, Jul 21, 2011 at 3:41 PM, Vincent Povirk <madewokherd at gmail.com>wrote:
> mono/metadata/icall-def.h contains references to the implementations
> of internal calls. Apparently, that method is mono_monitor_enter,
> implemented in monitor.c.
> On Wed, Jul 20, 2011 at 9:54 PM, imays <imays at naver.com> wrote:
> > I got a question how Monitor.Enter works. I investigated .net framework
> > source code, and it shows this only:
> > [System.Security.SecurityCritical] // auto-generated
> > [ResourceExposure(ResourceScope.None)]
> > [MethodImplAttribute(MethodImplOptions.InternalCall)]
> > private static extern void ReliableEnter(Object obj, ref bool
> > lockTaken);
> > I guess Monitor.Enter implementation is platform dependent, so I browsed
> > Mono source code and I gave up :(
> > Yes, a critical section assigned for each System.Object instance may
> > but, I don't think the actual Monitor.Lock is written like this, because
> > creating a critical section for each System.Object will cost unlimitedly.
> > (Win32 does not allow billions of critical section objects in a process!)
> > Does anybody know how Monitor.Lock works? Please reply. Thanks in
> > --
> > View this message in context:
> > Sent from the Mono - General mailing list archive at Nabble.com.
> > _______________________________________________
> > Mono-list maillist - Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list