Closedown
This commit is contained in:
1 parent
1574a1dab6
commit
3091a84c8d
1 file changed
+4
-2
@@ -1,3 +1,4 @@
|
||||
"""
|
||||
import ctypes
|
||||
def ctype_async_raise(thread, exception):
|
||||
tid=thread.ident
|
||||
@@ -14,11 +15,12 @@ def ctype_async_raise(thread, exception):
|
||||
ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, NULL)
|
||||
raise SystemError("PyThreadState_SetAsyncExc failed")
|
||||
|
||||
|
||||
"""
|
||||
#import signal
|
||||
|
||||
def on_abort(parent_thread):
|
||||
print ("abort")
|
||||
ctype_async_raise(parent_thread, KeyboardInterrupt)
|
||||
#ctype_async_raise(parent_thread, KeyboardInterrupt)
|
||||
|
||||
|
||||
time.sleep(10.0)
|
||||
Reference in new issue
Block a user