4 ms·
Thread safe ittertors? really are we still on these topics lazy from typing import Iterator def stream_events(...) -> Iterator[str]: while True: y
by syedMohib45 5mo ago
Thread safe ittertors? really are we still on these topics
lazy from typing import Iterator
def stream_events(...) -> Iterator[str]:
while True:
yield blocking_get_event(...)
events = stream_events(...)
for event in events:
consume(event)