Closed samfrances closed 3 years ago
For the avoidance of doubt, this also happens if you use pipe.merge()
:
import asyncio
from aiostream import pipe, stream
async def foo():
inbox = stream.iterate([1, 2, 3, 4])
inbox2 = stream.iterate([4, 5, 6, 7])
merged = inbox | pipe.merge(inbox2)
async with merged.stream() as s:
async for message in s:
print(message)
if message > 5:
return
async def main():
await foo()
asyncio.run(main())
Hi @samfrances,
This is definitely a bug (a pretty big one in my opinion), thanks for reporting it.
I'll try to investigate that as soon as possible, I'll let you know how it goes.
Thanks @vxgmichel. I did try to have a look at the code in question, but its beyond my current understanding of asyncio, I think. Sorry not to be more help.
@samfrances Well the small reproducible example you provided helped a lot, the problem should now be fixed!
I'll let you know when the new release is available.
Thanks for the quick bug fix!
I'm getting an unexpected error when I run a program with the following structure:
The error is as follows:
This error occurs in version
0.3.2
but not in version0.3.1
.Any help much appreciated.