Message374587
At a glance, it looks like ENTER_PYTHON will *restore* the GIL on the current thread, but it may be coming in on a thread that's never seen the GIL before.
"The GIL" is actually the Python thread state, which is actually a per-thread data structure that's either active/locked or inactive/unlocked. If the current thread doesn't have a thread state, PyGILState_Ensure will create one, while ENTER_PYTHON will not.
So the underlying issue is probably that the callbacks are coming in from a thread that they shouldn't be, and really ought to be marshalled back into the correct event loop first. |
|
Date |
User |
Action |
Args |
2020-07-29 21:25:44 | steve.dower | set | recipients:
+ steve.dower, paul.moore, tim.golden, zach.ware, serhiy.storchaka, speleo3, epaine |
2020-07-29 21:25:44 | steve.dower | set | messageid: <1596057944.05.0.568480014929.issue40075@roundup.psfhosted.org> |
2020-07-29 21:25:44 | steve.dower | link | issue40075 messages |
2020-07-29 21:25:43 | steve.dower | create | |
|