Visitar URL original
gh-103092: Isolate _tkinter (WIP) by erlend-aasland · Pull Request #103108 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260323205629/https://github.com/python/cpython/pull/103108
Skip to content
/ cpython Public

gh-103092: Isolate _tkinter (WIP)#103108

Closed
erlend-aasland wants to merge 18 commits intopython:mainfrom
erlend-aasland:isolate-tkinter
Closed

gh-103092: Isolate _tkinter (WIP)#103108
erlend-aasland wants to merge 18 commits intopython:mainfrom
erlend-aasland:isolate-tkinter

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Mar 29, 2023 •

TODO

  • There's no way to pass state to PyOS_InputHooks. Introduce a new hook with context pointer? Just opt out of multi-phase init / module state for _tkinter? Or just protect these with per-interpreter locks.

  • Handle the three Tcl mutexes

@arhadthedev
Copy link
Member

There's no way to pass state to PyOS_InputHooks. Introduce a new hook with context pointer?

We can add two private API functions (a name and arguments are up to discussion):

  • int _PyOS_suscribesig(int i, void(*)(int, void *) h, void *harg);
  • void _PyOS_unsuscribesig(int subscription);

and reimplement PyOS_setsig as a wrapper to avoid conflicts.

By the way, are the signals are process-wide or pthread-wide? If the former, is there a global CPython structure common for all (sub)interpreters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants