From 71465ca969c19f356c60252c55529cf27508afc0 Mon Sep 17 00:00:00 2001 From: KeiTa4446 Date: Tue, 6 Aug 2024 10:59:24 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88?= =?UTF-8?q?=E3=81=AE=20max=5Fworkers=20=E3=81=AE=E5=80=A4=E3=82=92CPU?= =?UTF-8?q?=E3=81=AE=E6=9C=80=E5=A4=A7=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89?= =?UTF-8?q?=E6=95=B0=E3=81=AB=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dem_to_csmap.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dem_to_csmap.py b/dem_to_csmap.py index be0572a..a771bb4 100644 --- a/dem_to_csmap.py +++ b/dem_to_csmap.py @@ -1,3 +1,4 @@ +import multiprocessing import os from PyQt5.QtCore import Qt @@ -27,6 +28,9 @@ def __init__(self): self.ui.mQgsFileWidget_output.setFilter("*.tif") self.ui.mQgsFileWidget_output.setStorageMode(QgsFileWidget.StorageMode.SaveFile) + # デフォルトの max_workers の値をCPUの最大スレッド数に設定 + self.ui.spinBoxMaxWorkers.setValue(multiprocessing.cpu_count()) + # ボタンのクリックイベント self.ui.pushButton_run.clicked.connect(self.convert_dem_to_csmap) self.ui.pushButton_cancel.clicked.connect(self.close)