The "no gc" crowd
Sean Kelly
sean at invisibleduck.org
Fri Oct 11 11:04:57 PDT 2013
On Friday, 11 October 2013 at 17:50:26 UTC, Dicebot wrote:
>
> How can one possibly used "synchronized" for this in absence of
> classes if desire behavior is to lock an entity, not statement
> block?
I'm not sure I follow. But I was in part objecting to the use of
synchronized without a related object:
synchronized {
// do stuff
}
This statement should be illegal. You must always specify a
synchronization context:
synchronized(myMutex) {
// do stuff
}
For the rest, it seemed like the suggestion was that you could
just wrap a statement in any old synchronized block and all your
problems would be solved, which absolutely isn't the case.
More information about the Digitalmars-d
mailing list