Thursday, November 30, 2006

Thread locks

Did you know that to set a ctitical section in the static method it is possible to write the following:
class AClass {
...

public static void Method()
{
lock(typeof(AClass))
{...}
}
...
}

No comments: