17 lines
306 B
Hare
17 lines
306 B
Hare
use types::c;
|
|
use fmt;
|
|
use thread;
|
|
|
|
fn thread_start() void = {
|
|
fmt::println("hello from another thread")!;
|
|
};
|
|
|
|
export fn main() void = {
|
|
fmt::println("starting a thread")!;
|
|
let tid = thread::spawn(&thread_start)!;
|
|
|
|
fmt::println("joining")!;
|
|
thread::join(tid)!;
|
|
fmt::println("joined. good bye.")!;
|
|
};
|