On Sun, 23 Oct 2011 08:32:34 -0400, simendsjo <[email protected]> wrote:
What does shared for functions mean? I thought it was supposed to
automatically synchronize access, but this doesn't seem to be the case.
void f() shared {
// no synchronization
}
void f() {
synchronized {
// do stuff
}
}
Shared functions do not affect the function. All they do is affect the 'this' pointer.
This:
struct S
{
void f() shared {}
}
is roughly equivalent to this:
struct S
{}
void f(shared ref Foo this){}
-Steve
