ref: 77246bfe1b9f147b1b255e811fb8b2032c49dc9e
dir: /lib/thread/test/waitgrp.myr/
use std
use thread
const Threadc = 8
var wg
const main = {
wg = thread.mkwg(Threadc)
for var i = 0; i < Threadc; i++
thread.spawn({
std.usleep(3_000_000)
thread.wgpost(&wg)
thread.wgwait(&wg)
})
;;
thread.wgwait(&wg)
}