"Frank Millman" <fr...@chagford.com>: > "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?
Only you can tell. > I just assume that it will be executed at some point. Is it not > reasonable to do the same here? It ain't over till the fat lady sings. Things can accumulate, hang and/or fail in surprising ways. At the very least you should maintain statistics that reveal the number of pending closing tasks for troubleshooting when things go south. Marko -- https://mail.python.org/mailman/listinfo/python-list