you'll want to put a loop around the async iterato...
# random
h
you'll want to put a loop around the async iterator
👍 1
j
are there any performance implications with looping? should i throttle it in any way?
h
should be fine
there's an await in the loop
j
can you please point me to an example of the loop? much appreciated!
h
Copy code
const iter = await subscribe();

while (true) {
  const { value, done } = await iter.next();
  if (done) break;
  
  // do something with the value
}
something like that
j
👍