langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
27
Task/Concurrent-computing/Objeck/concurrent-computing.objeck
Normal file
27
Task/Concurrent-computing/Objeck/concurrent-computing.objeck
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue