File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 88six >= 1.14.0
99matplotlib
1010pandas
11- multiprocess
1211packaging
1312x2paddle
1413rarfile
Original file line number Diff line number Diff line change 1414# =======================================================================
1515import os
1616import re
17+ from multiprocessing import Process
18+ from multiprocessing import Queue
1719from threading import Lock
1820from threading import Thread
1921
2022import packaging .version
21- from multiprocess import Process
22- from multiprocess import Queue
2323
2424from .parser .const_description import * # noqa: F403
2525from .parser .event_node import load_profiler_json
Original file line number Diff line number Diff line change 1717import multiprocessing
1818import os
1919import re
20+ import signal
2021import sys
2122import threading
2223import time
@@ -78,6 +79,9 @@ def get_locale():
7879 lang = request .accept_languages .best_match (support_language )
7980 return lang
8081
82+ signal .signal (
83+ signal .SIGINT , signal .SIG_DFL
84+ ) # we add this to prevent SIGINT not work in multiprocess queue waiting
8185 babel = Babel (app , locale_selector = get_locale ) # noqa:F841
8286 # Babel api from flask_babel v3.0.0
8387 api_call = create_api_call (args .logdir , args .model , args .cache_timeout )
You can’t perform that action at this time.
0 commit comments