Running Phobos unit tests in threads: I have data

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Sat May 3 13:11:44 PDT 2014


03-May-2014 21:22, Atila Neves пишет:
> I can reproduce the slower-with-threads issue without using my library.
> I've included the source file below and would like to know if other
> people see the same thing.
>
> The Phobos modules are all called "ustd" because I couldn't/didn't know
> how to get this to work otherwise. So I copied the std/*.d files to a
> directory called ustd and changed their module declarations. Silly but
> it works. I'd love to know how to do this properly.

[snip]

>      if(single) {
>          foreach(test; tests) {
>              test();
>          }
>      } else {
>          foreach(test; tests.parallel) {

Try different batch size:
test.parallel(1), test.parallel(2) etc.



-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list