yaron,
Yes, MethodImpl Synchronized is implemented exactly like that it uses
lock(this) for the entire method. It can be easily tested. However I don't
see anywhere in the docs this documented so I don't know if it is a good
idea to build your code based on this presumption.
On the other hand the implementation is still the same in .NET 2.0.
Why you want to use MethodImp attribute? Why you don't use lock statements?
lock(this) is not always a good idea.
Take a look at this article it has some guidlines of how to use different
sync techniques.
http://msdn.microsoft.com/library/de...netchapt05.asp
HTH
Stoitcho Goutsev (100) [C# MVP]
"yaron" <ya***@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hi,
Does MethodImpl Synchronized attribute is like lock(this) ?
i mean that a call to Monitor.PulseAll(this) from a Synchronized method
will
trigger other thread that call to Monitor.Wait(this) ?
Thanks.