vxgmichel / aiostream

Generator-based operators for asynchronous iteration
http://aiostream.readthedocs.io
GNU General Public License v3.0
800 stars 34 forks source link

How to close the async stream in the middle of execution. #38

Closed rvpanchani closed 5 years ago

rvpanchani commented 5 years ago

I am creating a several pipelines using aiostream and wanted to stop any specific running pipeline on external event. What could be the cleaner approach to stop the already running pipeline. I cannot close or stop the event loop because the same event loop is shared by all the pipeline tasks.

vxgmichel commented 5 years ago

Hi @rvpanchani,

Cancelling and awaiting the task corresponding to a specific pipeline should be enough to ensure a clean stop. Please let me know if that helps :)

rvpanchani commented 5 years ago

@vxgmichel - It worked i forgot to reply due to lost in solving other issues :) Thanks Michel