Skip to content

Commit

Permalink
1.6.2-a.3
Browse files Browse the repository at this point in the history
使用jpype的模块无法正常退出虚拟机,导致程序进程残留
  • Loading branch information
HowieHz committed Jun 18, 2022
1 parent f920325 commit 5f44f50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Plugin/A_Plus_B_import_Java_schz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import hpyculator as hpyc
import jpype
import atexit

NAME = "高精度浮点数加法(基于Java)"
VERSION = "V1.0.3"
Expand Down Expand Up @@ -79,3 +80,4 @@ def on_calculate(data, todo):
else:
hpyc.write(jpype.JClass("com.shacha.Main").main(a, b))
# jpype.shutdownJVM() Shutdown must be called from main thread
atexit.register(jpype.shutdownJVM) # 退出执行函数,否则虚拟机不会退出,导致退出残留

0 comments on commit 5f44f50

Please sign in to comment.