synchronized { }
Vladimir Panteleev
thecybershadow at gmail.com
Thu Jun 26 15:18:58 PDT 2008
On Thu, 26 Jun 2008 04:18:41 +0300, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Right now, if you use a synchronized statement with no argument, it will
> sync on a mutex unique to that statement.
>
> Does anyone write threading code that depends on this behavior?
I think I used it once for:
void write_synced(string s)
{
synchronized writef("%s", s);
}
or maybe it was some other external resource not linked to a class.
--
Best regards,
Vladimir mailto:thecybershadow at gmail.com
More information about the Digitalmars-d
mailing list