From d45497bad52baeb9951164c713146c8dd20a07f3 Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Mon, 29 Aug 2022 17:23:39 +0200 Subject: [PATCH] Closedown --- script/test/test_abort.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/test/test_abort.py b/script/test/test_abort.py index 1053056..af27510 100644 --- a/script/test/test_abort.py +++ b/script/test/test_abort.py @@ -1,8 +1,10 @@ import ctypes def ctype_async_raise(thread, exception): tid=thread.ident + print (1) ret = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(exception)) # ref: http://docs.python.org/c-api/init.html#PyThreadState_SetAsyncExc + print (2) if ret == 0: raise ValueError("Invalid thread ID") elif ret > 1: @@ -16,7 +18,7 @@ def ctype_async_raise(thread, exception): def on_abort(parent_thread): print ("abort") - ctype_async_raise(parent_thread, KeyboardInterrupt) + #ctype_async_raise(parent_thread, KeyboardInterrupt) time.sleep(10.0) \ No newline at end of file