[Issue 8582] std.parallelism unittest failure on single processor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 24 12:43:07 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8582


David Simcha <dsimcha at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha at yahoo.com


--- Comment #2 from David Simcha <dsimcha at yahoo.com> 2012-08-24 12:43:00 PDT ---
I'm pretty sure this is because on a single core machine the default number of
threads in the TaskPool is zero.  finish() waits for all tasks to be finished
by calling Thread.join().  The worker threads are supposed to finish the tasks.
 If there are no worker threads there's nothing to wait on.

Instead, while the calling thread is waiting, it should pop tasks off the queue
and execute them.  Furthermore, put() should throw if new tasks are placed on
the queue while it's in this state.  

Will make a pull request soon.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list