Skip to content

Commit

Permalink
Refactor backend mainloop and common methods, thonny#1294
Browse files Browse the repository at this point in the history
  • Loading branch information
aivarannamaa committed Aug 2, 2020
1 parent 4ef08bf commit a9951b0
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 464 deletions.
14 changes: 11 additions & 3 deletions misc/thre.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
from _thread import interrupt_main
from threading import Thread
from time import sleep
import os
import signal


def inter():
print("interwait")
sleep(1)
print("interrupting")
interrupt_main()
#interrupt_main()
os.kill(os.getpid(), signal.SIGINT)
#os.raise_signal(signal.SIGINT)
print("interrupted")


Thread(target=inter).start()

#Thread(target=inter).start()
#"""
import tkinter
root = tkinter.Tk()
#root.focus_set()
root.mainloop()
#"""

#sleep(5)

print("done")
Loading

0 comments on commit a9951b0

Please sign in to comment.