Hello,

> Miguel de Icaza wrote:
> >     Would you mind sending me the IL output for the lock inside yield
> > using the August CTP? 
> 
> Attached is a zip with source and resulting dll.

You are right, I miss-read the IL output that I had on my machine.  

We do generate the same code, it is correct (and I was wrong).

That being said, you should still stay away from yields inside locks
unless you really know what you are doing.

I noticed something cute though: we (and MS) produce the "Monitor.Exit"
call on the generated Dispose method which might be a way of releasing
the lock.

I was quite surprised that we implemented this feature, and looking
through the logs it was Martin Baulig which got the Dispose semantics in
place.

Miguel.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to