On Apr 26, 2012, at 1:22 PM, Steve Schveighoffer wrote:Oops… you're right. The original implementation (Hoare's) did, I believe, but the modern one does not.
>
> From: Sean Kelly <sean@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).
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime