I think I was conflating a few different things when writing about avoiding blocking the event loop as a reason for using threads in the async implementation.
The reasoning for using threads is more:
async_stream_zip takes async iterables
which means if delegating to stream_zip, it would need to call async functions like anext or __anext__ from sync functions, and wait for them to complete.
there is only really one choice for this that works/avoids deadlock: run_coroutine_threadsafe.
which means this call must be in a different thread
I think I was conflating a few different things when writing about avoiding blocking the event loop as a reason for using threads in the async implementation.
The reasoning for using threads is more:
anext
or__anext__
from sync functions, and wait for them to complete.