Am 22.02.2016 um 08:27 schrieb Danni Coy via Digitalmars-d:
On Mon, Feb 22, 2016 at 5:09 PM, Sönke Ludwig
<digitalmars-d@puremagic.com> wrote:

This actually works already, if you use "shared static this". "static this"
is invoked for each thread that is started, thus it would overwrite the
existing value of num_triggers, potentially multiple times.

module config;

shared static this ()
{
     num_triggers = 1024;
}

private:
immutable(int) num_triggers = void;

is not working for me with dmd 2.070


I was wrong, there is obviously a language/compiler bug here. It compiles if you remove the "= void", but it does so for "shared static this" as well as for "static this". It really shouldn't in the latter case.

Reply via email to