Effect CommunityEC
Effect Community•2y ago•
23 replies
addamsson

Seeking `CountdownLatch` Implementation in Effect Library

I've seen that Effect has things like Semaphore, but is there an implementation for a CountdownLatch somewhere? (eg an object that can be awaited and it only resolves when n countdowns happen) eg:
const latch = latch(1);

// elsewhere
await latch.await();

// elsewhere
latch.countDown();
// 👆 this will resolve the promise we `await`
Was this page helpful?