Skip to content

Commit

Permalink
Back to using normal processes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas committed Jul 25, 2021
1 parent 4afb6da commit f67b36e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/preprocess_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ def main():
readers, writers = list(zip(*[multiprocessing.Pipe(duplex=False) for _ in range(args.workers - 2)]))
processes = [multiprocessing.Process(target=process_samples, args=(simple_queue, i, args, level, writer)) for i, writer in enumerate(writers)]
log_thread = multiprocessing.Process(target=log, args=(list(readers), args.log_interval))
# fill_thread = multiprocessing.Process(target=fill_simple_queue, args=(args.input, simple_queue, chunk_size))
fill_thread = multiprocessing.Process(target=fill_simple_queue, args=(args.input, simple_queue, chunk_size))

# fill_thread.start()
fill_thread.start()
log_thread.start()
for i, process in enumerate(processes):
process.start()
Expand All @@ -291,10 +291,10 @@ def main():
for writer in writers:
writer.close()

fill_simple_queue(args.input, simple_queue, chunk_size)
# fill_simple_queue(args.input, simple_queue, chunk_size)

# fill_thread.join()
# fill_thread.close()
fill_thread.join()
fill_thread.close()
for process in processes:
process.join()
process.close()
Expand Down

0 comments on commit f67b36e

Please sign in to comment.