Opening a separate issue from #49 for the sake of people googling why their process is just dying on them.
It seems a bit too easy to accidentally cause the event loop to die:
const { Repeater } = require('@repeaterjs/repeater')
const test = new Repeater((push, stop) => {
push(1)
// stop()
})
;(async () => {
for await (const value of test) {
console.log(value)
}
// event loop dies before this point unless you uncomment stop() above
console.log('done')
})()
Opening a separate issue from #49 for the sake of people googling why their process is just dying on them.
It seems a bit too easy to accidentally cause the event loop to die: