unhardcoding and general cleanup

This commit is contained in:
2026-07-17 00:07:56 -07:00
parent 2ff7cda93a
commit 0680718398
7 changed files with 1614 additions and 555 deletions
+5 -5
View File
@@ -69,9 +69,9 @@ def single_participant_worker(file_path, raw_data, result_queue, progress_queue)
""" Runs inside its own dedicated process """
p_name = os.path.basename(file_path)
try:
import flares as flares
from flares import fold_channels
# Perform the heavy fold_channels logic
channel_results = flares.fold_channels(raw_data, p_name, progress_queue)
channel_results = fold_channels(raw_data, p_name, progress_queue)
# Hand back results and signal completion
result_queue.put({file_path: channel_results})
@@ -736,13 +736,13 @@ class ProcessOrchestrator(QObject):
def run(self):
try:
# 🟢 [Delay 1 Fix] Instantiate Manager completely off the main thread
# Instantiate Manager completely off the main thread
manager = Manager()
result_queue = manager.Queue()
progress_queue = manager.Queue()
active_processes = []
# 🟢 [Delay 2 Fix] Perform heavy pickling loop safely in the background
# Perform heavy pickling loop safely in the background
for file_path in self.selected_files:
p = Process(
target=self.worker_func,
@@ -896,7 +896,7 @@ class ParticipantFoldChannelsWidget(FlaresBaseWidget):
self.progress_queue = progress_queue
self.active_processes = active_processes
# 🟢 Safely initialize and trigger your polling listener
# Safely initialize and trigger the polling listener
self.completed_count = 0
self.result_timer = QTimer()
self.result_timer.timeout.connect(self.check_parallel_results)