On Tuesday, September 20, 2016 04:17:21 crimaniak via Digitalmars-d-learn 
>          static shared immutable ReturnType!T value;

I would point out that immutable is implicitly shared, so there's no reason
to put shared on an immutable variable. However, you _do_ want to put shared
on a static constructor that initializes an immutable variable so that it's
only run once for the program instead of once per thread (the compiler
really should enforce that, but there's a longstanding bug that allows you
to reinitialize an immutable variable by not putting shared on the static
constructor and starting multiple threads).

- Jonathan M Davis

Reply via email to