Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88145
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: asyncio |
| Date | 2015-03-27 14:38 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <877fu2mx7x.fsf@elektro.pacujo.net> (permalink) |
| References | <mailman.237.1427445210.10327.python-list@python.org> <87d23un7k2.fsf@elektro.pacujo.net> <b1431003-3cc6-4672-83b8-f82c4677d4b4@googlegroups.com> |
orangewarrior@gmail.com: > On Friday, March 27, 2015 at 1:55:36 AM UTC-7, Marko Rauhamaa wrote: >> Łukasz Ligowski <orangewarrior@gmail.com>: >> >> > Is there a way to prune finished tasks (I tried forcing gc) or I do >> > something wrong? >> >> Guessing that you need to call asyncio.wait() or asyncio.wait_for() to >> get rid of the zombies. >> >> (Apparently the loop object keeps references to completed tasks. I'm not >> sure this design choice is necessary.) > > Should I launch tasks differently? Waiting for task that is done returns > that task in done subset but it still lingers in list of all tasks... I don't know the answer to your question. A superficial glance at the relevant asyncio source code (and documentation) suggests you shouldn't be seeing what you are seeing. Tasks are kept in a weak set. Tasks should evaporate as soon as nobody references them. I wonder if there's a cyclical reference there somewhere. See if running GC removes the tasks. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
asyncio Łukasz Ligowski <orangewarrior@gmail.com> - 2015-03-27 01:33 -0700
Re: asyncio Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 10:55 +0200
Re: asyncio orangewarrior@gmail.com - 2015-03-27 02:32 -0700
Re: asyncio Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 14:38 +0200
Re: asyncio Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-27 08:15 -0600
Re: asyncio Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 17:44 +0200
Re: asyncio Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 17:52 +0200
Re: asyncio orangewarrior@gmail.com - 2015-03-27 16:27 -0700
csiph-web