<html><body bgcolor="#FFFFFF"><div>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. </div><div><br>Sent from my iPhone</div><div><br>On Jun 24, 2011, at 5:04 AM, d coder <<a href="mailto:dlang.coder@gmail.com">dlang.coder@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><br></div></div>
Yes, there is a flag .. in the source code! Just download the source and apply this patch:<br><br></blockquote><div><br></div><div>Thanks</div><div><br></div><div>Most of the times I use explicit synchronized code blocks, instead of adding "synchronized" attribute to the function itself.</div>

<div><br></div><div>Would the patch you sent still work?</div><div><br></div><div>Regards</div><div>- Puneet</div></div>
</div></blockquote></body></html>