On Sat, 15 Dec 2018 13:49:03 +, Heromyth wrote:
> Yes, it's very dangerous to create a new thread in shared static this().
> For a big project, it sometimes hard to identify this problem. Maybe,
> the compiler should do something for this, should it?
The runtime, more likely. There are plenty
On Saturday, 15 December 2018 at 03:48:15 UTC, Neia Neutuladh
wrote:
On Sat, 15 Dec 2018 02:54:55 +, Heromyth wrote:
shared static this() {
writeln("running A in shared static this(),
sharedField=", sharedField);
Thread th = new Thread(() { });
th.start();
On Sat, 15 Dec 2018 02:54:55 +, Heromyth wrote:
> shared static this() {
> writeln("running A in shared static this(),
> sharedField=", sharedField);
>
> Thread th = new Thread(() { });
> th.start();
When you start a D thread, thread-local static constructors
On Saturday, 15 December 2018 at 02:54:55 UTC, Heromyth wrote:
We have a module including many globle variables which are
needed to be initialized firstly in "shared static this() {}",
see here
https://github.com/huntlabs/hunt/blob/master/source/hunt/time/Init.d.
The problem is that these var
We have a module including many globle variables which are needed
to be initialized firstly in "shared static this() {}", see here
https://github.com/huntlabs/hunt/blob/master/source/hunt/time/Init.d.
The problem is that these variables are not always initialized
firstly when are referenced by