3 ms·
That's exactly what the author ends up with, too. It's also how you might handle this in any other language that allows for some form of "join", either intended
by Jtsummers 2y ago
That's exactly what the author ends up with, too. It's also how you might handle this in any other language that allows for some form of "join", either intended or usable as a join. Waiting on promises, thread joins, channels (as a signal mechanism), it's all the same pattern: Instantiate a bunch of asynchronous activities and queue up a "handler" corresponding to it, wait on the handlers in your desired order.