addshore
02/26/2025, 3:12 PMtasks := []
tasks.add (task (:: log.info "foo")
tasks.add (task (:: do.something "else")
tasks.do: |t| t.wait
log.info "all done"
But I believe this isn't doing what I'd expect.
Is there a way to wait for a collection of actions such as tasks in this way?kasperl
02/26/2025, 3:18 PMkasperl
02/26/2025, 3:19 PMkasperl
02/26/2025, 3:19 PMkasperl
02/26/2025, 3:20 PMkasperl
02/26/2025, 3:22 PMTask.group.kasperl
02/26/2025, 3:24 PMmonitor.Semaphore and down it tasks.size times and up it in finally clauses in the individual task lambdas.kasperl
02/26/2025, 6:03 PMTask.group in Jaguar: https://github.com/toitlang/jaguar/commit/0170761a87c43ad025ddbec0e77b36ff66d9f31f.