ce3a0eaa by 冯轩

MOD:thread

1 parent c9ac407f
......@@ -54,7 +54,7 @@ import threading
import concurrent.futures
from concurrent.futures import ThreadPoolExecutor
pool = ThreadPoolExecutor(max_workers=20, thread_name_prefix="my_thread_")
#pool = ThreadPoolExecutor(max_workers=20, thread_name_prefix="my_thread_")
compare_log = logging.getLogger('compare')
log_base = '[Compare]'
......@@ -3730,7 +3730,9 @@ def fsm_compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=
# results = list(executor.map(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms))
compare_log.info('[fsm thread]')
pool = ThreadPoolExecutor(max_workers=5, thread_name_prefix="fsm_thread_")
pool.submit(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms)
pool.shutdown(wait=True)
def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False):
......@@ -3806,7 +3808,9 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True
# results = list(executor.map(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms))
compare_log.info('[non fsm thread]')
pool = ThreadPoolExecutor(max_workers=5, thread_name_prefix="non_fsm_thread_")
pool.submit(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms)
pool.shutdown(wait=True)
def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False):
# POS: application_id, application_entity, uniq_seq, None
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!