One for experts in std.parallelism

Moritz Maxeiner via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 12 11:54:51 PDT 2017


On Sunday, 11 June 2017 at 19:06:48 UTC, Andrei Alexandrescu 
wrote:
> I tried to eliminate the static shared ~this as follows:
>
> https://github.com/dlang/phobos/pull/5470/commits/a4b2323f035b663727349d390719509d0e3247ba
>
> However, unittesting fails at src/core/thread.d(2042). I 
> suspect it's because the atexit call occurs too late, after the 
> shared static this in src/core/thread.d has already been called.
>
> Thoughts on how to make this work?

Obligatory reminder that the static shared ~this you are trying 
to port is buggy[1] and any of std.parallelism's alleged "daemon" 
threads being busy in reality keeps the program from terminating.

[1] https://issues.dlang.org/show_bug.cgi?id=16324


More information about the Digitalmars-d mailing list