Some Issues With Synchronized

Sean Kelly sean at invisibleduck.org
Mon Jan 9 07:57:13 PST 2012


I know. But once I add the ability to replace a mutex there's no way to detect how it's being used. Though as its in core I guess the user should simply be trusted to do the right thing. 

Sent from my iPhone

On Jan 9, 2012, at 6:57 AM, "Steven Schveighoffer" <schveiguy at yahoo.com> wrote:

> On Mon, 09 Jan 2012 09:41:40 -0500, Sean Kelly <sean at invisibleduck.org> wrote:
> 
>> Which goes back to my argument that we should ship both checked and unchecked (release and not) builds and the compiler should link the proper one.
> 
> Or you make it a release-mode check.  I can't imagine this being an inner-loop operation.
> 
> But my point was, it's already unsafe.  We've not had horrible issues with it in its current state.  Is it worse to allow replacing the monitor?  If you take the right steps (i.e. do it first line of the ctor), it's not going to result in a race condition.
> 
> -Steve


More information about the Digitalmars-d mailing list