Skip to content

Commit

Permalink
Create thre.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aivarannamaa committed Jul 31, 2020
1 parent d3af047 commit 4ef08bf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions misc/thre.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from _thread import interrupt_main
from threading import Thread
from time import sleep


def inter():
print("interwait")
sleep(1)
print("interrupting")
interrupt_main()
print("interrupted")


Thread(target=inter).start()

import tkinter
root = tkinter.Tk()
root.mainloop()

print("done")

0 comments on commit 4ef08bf

Please sign in to comment.