November 08, 2005
While on the subject of Threads would someone please hit me w/ the clue bat b/c I can't seem to get the following working. This example should just call since I've overloaded it . But that's not what happens. It just call

the mthread constructor and finishes. I'd also appreciate any links to some beginner Thread examples in D. I'm sure the locks code would come in handy at some point but I'm not there yet.

int main () {
mthread m = new Thread();; // <== this should call but it just calls the constructor

return 0;

module mthread;
import std.thread;

class mthread : Thread {
this () {
std.string.writefln("S thread cons");
std.string.writefln("E thread cons");

~this() { }

int run () { foo(); }

void foo () {
std.string.writefln("inside foo");
void bar () {
std.string.writefln("inside bar");