3 ms·
That's exactly what I was thinking. Some of us are probably are using this type of control flow. For me a common scenario is something like const promise
by Osiris 8y ago
That's exactly what I was thinking. Some of us are probably are using this type of control flow. For me a common scenario is something like
const promises = files.map(readFileAsync); // "nursery"
const fileContents = await Promise.all(promises); // "with"
I generally agree with his premise that it sucks having to figure out if a function is concurrent or not; i.e., does it return a value or a Promise/Future. I'm not sure if his solution solves that particular issue though, unless it's handled automatically in his "nursery.start_soon" function.