21 lines
439 B
Plaintext
21 lines
439 B
Plaintext
import io:*
|
|
import os:*
|
|
import thread:*
|
|
|
|
fun main(): int {
|
|
var a = 1337
|
|
println("hello from main first");
|
|
var t = run(fun(l: int) {
|
|
print("hello from thread first ")
|
|
println(a+l)
|
|
system("sleep 2")
|
|
print("hello from thread second ")
|
|
println(a+l)
|
|
}, 10)
|
|
system("sleep 1")
|
|
println("hello from main middle");
|
|
join(t)
|
|
println("hello from main after join");
|
|
return 0
|
|
}
|