I have written the following code:

test.d
==============================
import core.thread;
import std.stdio;

void threadFunc(){
        writeln("Thread func");
}

public static this(){
        auto t = new Thread( &threadFunc );
        t.start();

        writeln("Static init");
}

void main(){
     writeln("End of main");
}


run
======================
rdmd test.d


result
======================
Static init
Thread func
Static init
Thread func
Static init
Thread func
Static init
Thread func
Static init
Thread func
Static init
Thread func
Static init
Thread func
Static init
Thread func
Sta...

Is this normal, what's happening?

Reply via email to