<div class="gmail_extra">Now I'm really confused.</div><div class="gmail_extra"><br></div><div class="gmail_extra">How is this thing *actually* supposed to be used? And can we add some examples to the docs?</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">Alex<br><br><div class="gmail_quote">On Fri, Apr 27, 2012 at 1:08 AM, Sean Kelly <span dir="ltr"><<a href="mailto:sean@invisibleduck.org" target="_blank">sean@invisibleduck.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Apr 26, 2012, at 1:22 PM, Steve Schveighoffer wrote:<br>
><br>
> From: Sean Kelly <<a href="mailto:sean@invisibleduck.org">sean@invisibleduck.org</a>><br>
> void put(T val) {<br>
>     synchronized (cond.mutex) {<br>
>         queue.pushBack(val);<br>
>         cond.notify(); // atomically unlocks mutex on call, locks on return<br>
>     }<br>
> }<br>
> Huh, I thought notify did not unlock the mutex at all (I don't see why it would need to).<br>
<br>
</div>Oops… you're right.  The original implementation (Hoare's) did, I believe, but the modern one does not.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
D-runtime mailing list<br>
<a href="mailto:D-runtime@puremagic.com">D-runtime@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/d-runtime" target="_blank">http://lists.puremagic.com/mailman/listinfo/d-runtime</a><br>
</div></div></blockquote></div><br></div>