The test is wrong, not the implementation of std.parallelism. finish(false) doesn't guarantee that the task won't be finished, it just means that the task <b>may</b> not be finished. IDK how this test made it in there. I'll make a pull request to get rid of it.<div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Dec 8, 2012 at 5:59 AM, Masahiro Nakagawa <span dir="ltr"><<a href="mailto:repeatedly@gmail.com" target="_blank">repeatedly@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tested same configuration on Mac, but no failure.<br>
Failed test seems to depend on machine state.<br>
<br>
static void slowFun() { Thread.sleep(dur!"msecs"(1)); }<br>
auto pool1 = new TaskPool();<br>
auto tSlow = task!slowFun();<br>
pool1.put(tSlow);<br>
pool1.finish();<br>
assert(!tSlow.done);<br>
<br>
Calling finish without true argument, finish doesn't wait the task.<br>
So the result of tSlow.done depends on the timing.<br>
<br>
I don't understand the std.parallelism deeply,<br>
but this failure may occurs on other environments.<br>
<br>
<br>
Masahiro<br>
<div><div class="h5"><br>
On Sat, Dec 8, 2012 at 3:37 PM, Alex Rønne Petersen <<a href="mailto:xtzgzorex@gmail.com">xtzgzorex@gmail.com</a>> wrote:<br>
> See: <a href="http://d.puremagic.com/test-results/test_data.ghtml?runid=36650&logid=6" target="_blank">http://d.puremagic.com/test-results/test_data.ghtml?runid=36650&logid=6</a><br>
><br>
> Does anyone have the time to investigate this?<br>
><br>
> Thanks,<br>
> Alex<br>
</div></div>> _______________________________________________<br>
> phobos mailing list<br>
> <a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>
> <a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</blockquote></div><br></div>