Le jeu. 9 janv. 2020 à 19:33, Steve Dower <steve.dower@python.org> a écrit :
Requiring an _active_ Python thread (~GIL held) to only run on a single OS thread is fine, but tying it permanently to a single OS thread makes things very painful. (Of course, this isn't the only thing that makes it painful, but if we're going to make this a deliberate design of CPython then we are essentially excluding entire interesting classes of embedding.)
Do you have an use case where you reuse the same Python thread state in different native threads? Currently, the Python runtime expects to have a different Python thread state per native thread. For example, PyGILState_Ensure() creates one if there is no Python thread state associated to the current thread. Victor -- Night gathers, and now my watch begins. It shall not end until my death.