Skip to content

Commit

Permalink
added daemin for threads
Browse files Browse the repository at this point in the history
  • Loading branch information
aymericdamien committed Sep 13, 2016
1 parent f0ba5ca commit 514dd3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tflearn/data_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def start(self, reset_status=True):
for i in range(self.num_threads)]
self.threads = bi_threads + fd_threads
for t in self.threads:
t.daemon = True
t.start()

def stop(self):
Expand All @@ -161,7 +162,9 @@ def stop(self):
for i in range(self.num_threads):
self.batch_ids_queue.put(False)
# Launch a Thread to wait for processing scripts to finish
threading.Thread(target=self.wait_for_threads).start()
t = threading.Thread(target=self.wait_for_threads)
t.daemon = True
t.start()

def reset(self):
""" reset.
Expand Down

0 comments on commit 514dd3f

Please sign in to comment.