"Marko Rauhamaa"  wrote in message news:87vaulitxe....@elektro.pacujo.net...

"Frank Millman" <fr...@chagford.com>:

> I changed 'await self.close()', to > 'asyncio.ensure_future(self.close())'.
>
> Problem solved.

A nice insight.

However, shouldn't somebody somewhere in your code be keeping track of
the returned task?


I don't know. What is the worst that could happen?

My way of looking at it is that it is similar to setTimeout() in javascript. I am requesting that the enclosed function/coroutine be scheduled for execution at the next available opportunity in the event loop. In javascript, I don't keep track of it, I just assume that it will be executed at some point. Is it not reasonable to do the same here?

Frank


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to