28 lines
540 B
Plaintext
28 lines
540 B
Plaintext
bundle Default {
|
|
class MyThread from Thread {
|
|
New(name : String) {
|
|
Parent(name);
|
|
}
|
|
|
|
method : public : Run(param : Base) ~ Nil {
|
|
string := param->As(String);
|
|
string->PrintLine();
|
|
}
|
|
}
|
|
|
|
class Concurrent {
|
|
New() {
|
|
}
|
|
|
|
function : Main(args : System.String[]) ~ Nil {
|
|
t0 := MyThread->New("t0");
|
|
t1 := MyThread->New("t1");
|
|
t2 := MyThread->New("t2");
|
|
|
|
t0->Execute("Enjoy"->As(Base));
|
|
t1->Execute("Rosetta"->As(Base));
|
|
t2->Execute("Code"->As(Base));
|
|
}
|
|
}
|
|
}
|