If you synchronize via a Mutex you could create a type that detects whatever and doesn't actually lock if single threaded. core.thread.thread_needLock() is an option if you can be sure a thread won't be spawned inside your magically not-locked function.
Sent from my iPhone On Jun 24, 2011, at 5:04 AM, d coder <dlang.co...@gmail.com> wrote: > > Yes, there is a flag .. in the source code! Just download the source and > apply this patch: > > > Thanks > > Most of the times I use explicit synchronized code blocks, instead of adding > "synchronized" attribute to the function itself. > > Would the patch you sent still work? > > Regards > - Puneet