let handle = &{
sleep 2;
echo Hello world!;
}
# Do some other work before calling join.
# This may be printed before or after "Hello world!".
std.print("Doing some work...")
# This will wait until the block runs to completion, and will return it's result.
let result = handle.join()
std.assert(result == nil)
I'd expect Doing some work... to be printed, and then Hello world!. Instead, it sleeps without any output, and then prints:
For the following code:
I'd expect
Doing some work...
to be printed, and thenHello world!
. Instead, it sleeps without any output, and then prints:Hush 0.1.4 41adf74