8000 gh-83274: Stop deallocation of Tkapp causing Python interpreter crash by E-Paine · Pull Request #21532 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-83274: Stop deallocation of Tkapp causing Python interpreter crash #21532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Use lambda for thread
  • Loading branch information
E-Paine committed Jul 20, 2020
commit 2f28f0ab74be324426586677ebea58c1c0223173
4 changes: 1 addition & 3 deletions Lib/tkinter/test/test_tkinter/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
support.requires('gui')

def test_thread_gc():
def wait(obj):
ev.wait()
root = tkinter.Tk()
root.destroy()
ev = threading.Event()
threading.Thread(target=wait, args=(root,)).start()
threading.Thread(target=lambda obj: ev.wait(), args=(root,)).start()
del root
ev.set()
print("passed")
Expand Down
0