[Issue 16] Programs that use std.parallelism.taskPool hang

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Sat Dec 15 20:47:21 PST 2012


http://gdcproject.org/bugzilla/show_bug.cgi?id=16

jerro.public at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jerro.public at gmail.com

--- Comment #1 from jerro.public at gmail.com 2012-12-16 04:47:21 UTC ---
I'm having a problem with this bug too, but for me the test case in the report
only hangs in rare cases. This hangs every time for me (on x86_64 debian wheezy
with commit f07f442 of GDC built with GCC 4.8-20121209):

import std.stdio, std.parallelism;

void main()
{
    writeln(taskPool.reduce!"a+b"([0, 1, 2, 3]));
}

The reason for this is that gdc generates code that doesn't call
atomicReadUbyte(status) on every iteration of the loop in
std.parallelism.TaskPool.workLoop as the source code does, but calls it once
before the loop begins and then uses a stored value inside the loop.

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.


More information about the D.gnu mailing list