-
Type: Task
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Implementation
-
None
Hello,
I am trying to use change streams and this code snippet is blocking:
for (const auto& event : stream) { handleEvent(event); }
I run the above code periodically on different streams. But I see that stream iteration blocks when it is empty and I am not able to break out of this loop if that happens. Why is that the case? How can I read all available events in the stream and not be blocked? I cannot use a break; since I don't know before reading the stream how many events are in there.
- related to
-
CXX-2441 Add example of iterating change stream indefinitely
- Closed