proposal: pool.flat
betula opened this issue · comments
private finish_purchase = pool(async () => {
if (this.finish_purchase.count > 1) return; // not count.val here
});
const a = pool(async () => {
if (a.count.val > 1) return a.threads[0].promise; // Return promise from first thread
}
assert(a.flat.pending === false);
assert(chan(async () => {}).flat.pending === false);
Added to "the stream of conciseness 0.7+ roadmap"