Task

Spawn a new process which can run simultaneously with, and independently of, the original parent process.




import core.thread;
import std.stdio;
 
void main() {
    new Thread({
        writeln("Spawned thread.");
    }).start;
    writeln("Main thread.");
}