Skip to content

Commit

Permalink
Enable threading again
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Oct 11, 2024
1 parent b6cdb90 commit 73ae387
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions NiChart_DLMUSE/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ def main() -> None:
no_threads = args.cores # for now
subfolders = split_data(in_data, no_threads)

##threads = []
##for i in range(len(subfolders)):
## curr_out_dir = out_dir + f"split_{i}"
## curr_thread = threading.Thread(
## target=run_pipeline, args=(subfolders[i], curr_out_dir, device)
## )
## curr_thread.start()
## threads.append(curr_thread)

##for t in threads:
## t.join()
threads = []
for i in range(len(subfolders)):
curr_out_dir = out_dir + f"split_{i}"
curr_thread = threading.Thread(
target=run_pipeline, args=(subfolders[i], curr_out_dir, device)
)
curr_thread.start()
threads.append(curr_thread)

for t in threads:
t.join()

merge_output_data(out_dir)
remove_subfolders(in_data)
Expand Down

0 comments on commit 73ae387

Please sign in to comment.