[D-runtime] What's with core.sync.condition usage?

Steve Schveighoffer schveiguy at yahoo.com
Thu Apr 26 13:22:15 PDT 2012






>________________________________
> From: Sean Kelly <sean at invisibleduck.org>
>void put(T val) {
>    synchronized (cond.mutex) {
>        queue.pushBack(val);
>        cond.notify(); // atomically unlocks mutex on call, locks on return
>    }
>}
>Huh, I thought notify did not unlock the mutex at all (I don't see why it would need to).

-Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d-runtime/attachments/20120426/0ba4936e/attachment.html>


More information about the D-runtime mailing list