Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

empty list cannot be cleared issue fixed. #14882

Merged
merged 2 commits into from
Sep 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions example/ctc/multiproc_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, num_processes, max_queue_size, fn):
self.queue = mp.Queue(maxsize=int(max_queue_size))
self.alive = mp.Value(c_bool, False, lock=False)
self.num_proc = num_processes
self.proc = list()
self.proc = []
self.fn = fn

def start(self):
Expand Down Expand Up @@ -141,4 +141,5 @@ def reset(self):
print("Queue size on reset: {}".format(qsize))
for i, p in enumerate(self.proc):
p.join()
self.proc.clear()
if self.proc:
self.proc = []