<div dir="ltr"><div class="gmail_extra">On 8 April 2015 at 04:54, Yuriy Taraday <span dir="ltr"><<a href="mailto:yorik.sar@gmail.com" target="_blank">yorik.sar@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Did you miss mailing list intentionally?</div></div></blockquote><div><br><div class="gmail_default" style="font-family:courier new,monospace">​Ach no!  I always seem to do this on pypy-dev.  Thanks for pointing that out.​</div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><span class="">On Tue, Apr 7, 2015 at 5:59 PM William ML Leslie <<a href="mailto:william.leslie.ttg@gmail.com" target="_blank">william.leslie.ttg@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">On 8 April 2015 at 00:00, Yuriy Taraday <span dir="ltr"><<a href="mailto:yorik.sar@gmail.com" target="_blank">yorik.sar@gmail.com</a>></span> wrote:<br></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">GC introduces concurrency to user code anyway: call to some __del__ method can happen in any time in user code, so it might be called in a separate thread just as well<br></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div style="font-family:courier new,monospace;display:inline">​<br></div>​Obligatory: ​<a href="http://wingolog.org/archives/201" target="_blank">http://wingolog.org/archives/201</a><div style="font-family:courier new,monospace;display:inline">​​</div>2/02/16/unexpected-concurrency<br></div></div></div></div></blockquote><div><br></div></span><div>Yes, that's how I see it: one can't bet on where and when finalizers are run, so they appear to the rest of the program as if they're run in some special thread that wake ups in some scary moments. So a separate thread is just as good for them.</div></div></div></blockquote><div><br><div class="gmail_default" style="font-family:courier new,monospace">Except that, up until now, you can expect that __del__ is run ​in /one/ of the threads you've started.  If you only have one thread, you know exactly which thread your __del__ will be run in.  So you could make assumptions about thread-local state when you write such a method.<br clear="all"></div></div></div><br><div class="gmail_default" style="font-family:courier new,monospace">​Not that I have an opinion here.  __del__ is problematic, and entirely to be avoided in new code, afaiac.​</div><br>-- <br><div class="gmail_signature">William Leslie<br><br>Notice:<br>Likely much of this email is, by the nature of copyright, covered under copyright law.  You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in.  Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement.</div>
</div></div>