You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2020/09/09 04:23:17 UTC
[incubator-mxnet] branch v1.x updated: empty list cannot be cleared
issue fixed. (#14882)
This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch v1.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.x by this push:
new a9bd1d2 empty list cannot be cleared issue fixed. (#14882)
a9bd1d2 is described below
commit a9bd1d2f18e0ae4c434aff1cd32e5e98324c1b73
Author: Hafiz Shehbaz Ali <hs...@users.noreply.github.com>
AuthorDate: Wed Sep 9 08:21:51 2020 +0400
empty list cannot be cleared issue fixed. (#14882)
* empty list cannot be cleared issue fixed.
* Update multiproc_data.py
Co-authored-by: Sheng Zha <sz...@users.noreply.github.com>
---
example/ctc/multiproc_data.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/example/ctc/multiproc_data.py b/example/ctc/multiproc_data.py
index f4c6676..b33aa49 100644
--- a/example/ctc/multiproc_data.py
+++ b/example/ctc/multiproc_data.py
@@ -48,7 +48,7 @@ class MPData(object):
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):
@@ -122,4 +122,5 @@ class MPData(object):
print("Queue size on reset: {}".format(qsize))
for i, p in enumerate(self.proc):
p.join()
- self.proc.clear()
+ if self.proc:
+ self.proc = []