This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients asvetlov, twisteroid ambassador, yselivanov
Date 2018-10-01.15:43:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538408633.28.0.545547206417.issue34769@psf.upfronthosting.co.za>
In-reply-to
Content
Wow.  Thanks so much for figuring this out, I know how hard it is to debug issues like this.

Now I see it clearly: _asyncgen_finalizer_hook should be using loop.call_soon_threadsafe.  Interestingly, I used _write_to_self there, so I knew about the issue, but figured that using call_soon() + _write_to_self is safe enough; evidently I was wrong.

Anyways, here's the diff that fixed it for me: https://gist.github.com/1st1/c1c9fc853cac1fadb7102ccc6201fb70

Could you please create a PR (ideally with a unittest)?
History
Date User Action Args
2018-10-01 15:43:53yselivanovsetrecipients: + yselivanov, asvetlov, twisteroid ambassador
2018-10-01 15:43:53yselivanovsetmessageid: <1538408633.28.0.545547206417.issue34769@psf.upfronthosting.co.za>
2018-10-01 15:43:53yselivanovlinkissue34769 messages
2018-10-01 15:43:53yselivanovcreate