Update iptv流畅度检测.py

This commit is contained in:
frxz751113
2024-08-15 12:04:52 +08:00
committed by GitHub
parent ccdf6e98b4
commit 652ceda448
+2 -2
View File
@@ -846,9 +846,9 @@ def main(source_file_path, output_file_path):
# 使用with语句打开输出文件准备写入 # 使用with语句打开输出文件准备写入
with open(output_file_path, 'w', encoding='utf-8') as output_file: with open(output_file_path, 'w', encoding='utf-8') as output_file:
# 创建线程池,最大工作线程数为64 # 创建线程池,最大工作线程数为64
with ThreadPoolExecutor(max_workers=128) as executor: with ThreadPoolExecutor(max_workers=64) as executor:
# 为线程池中的每个线程提交worker函数 # 为线程池中的每个线程提交worker函数
for _ in range(128): for _ in range(64):
executor.submit(worker, task_queue, output_file, order_list, valid_count, invalid_count, len(lines)) executor.submit(worker, task_queue, output_file, order_list, valid_count, invalid_count, len(lines))
# 将所有行放入任务队列 # 将所有行放入任务队列
for line in lines: for line in lines: