Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40144
| References | <512f8aa9$0$30001$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmrCa6K49m5--UU61S-PMrYayBvdhjqu_OPzkq=f0eFWOQ@mail.gmail.com> <CABicbJ+ZFVJpeV8u4kWJngChbDZZDq+zV3dAmRVJdLEFz7Gy7Q@mail.gmail.com> |
|---|---|
| Date | 2013-03-01 04:33 +1100 |
| Subject | Re: Speeding up Python's exit |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2656.1362072826.2939.python-list@python.org> (permalink) |
On Fri, Mar 1, 2013 at 4:31 AM, Devin Jeanpierre <jeanpierreda@gmail.com> wrote: > On Thu, Feb 28, 2013 at 12:06 PM, Chris Angelico <rosuav@gmail.com> wrote: >> Is it any different if you create a deliberate reference loop and then >> stuff it into some module somewhere? That would force it to be kept >> until interpreter shutdown, and then a cyclic garbage collection after >> that, which quite probably would be never run. A stupid trick, >> perhaps, but it might work; I tested it with a dummy class with a >> __del__ method and it wasn't called. Putting it into some other module >> may not be necessary, but I don't know what happens with the >> interactive interpreter and what gets freed up when. > > __del__ is never called for cyclic references. D'oh. Test is flawed, then. But is the theory plausible? That the cycle detector won't be called on exit after other modules get freed? ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Speeding up Python's exit Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-28 16:49 +0000
Re: Speeding up Python's exit Neil Cerutti <neilc@norwich.edu> - 2013-02-28 17:02 +0000
Re: Speeding up Python's exit Chris Angelico <rosuav@gmail.com> - 2013-03-01 04:06 +1100
Re: Speeding up Python's exit Chris Angelico <rosuav@gmail.com> - 2013-03-01 04:33 +1100
Re: Speeding up Python's exit Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-02-28 12:33 -0500
Re: Speeding up Python's exit Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-02-28 12:31 -0500
Re: Speeding up Python's exit Grant Edwards <invalid@invalid.invalid> - 2013-03-01 01:17 +0000
Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 19:10 +0000
Re: Speeding up Python's exit Dave Angel <davea@davea.name> - 2013-03-01 14:17 -0500
Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 22:51 +0000
Re: Speeding up Python's exit Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-03-03 18:27 -0500
Re: Speeding up Python's exit Jason Swails <jason.swails@gmail.com> - 2013-03-01 21:51 -0500
Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 14:59 +0000
csiph-web