Skip to content

Commit

Permalink
flush atpbar in ThreadingHub
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jun 26, 2019
1 parent 984e1f8 commit 228ab03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mantichora/hubthreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from operator import itemgetter

import atpbar

##__________________________________________________________________||
class ThreadingHub(object):
"""A hub for Threading
Expand Down Expand Up @@ -137,6 +139,8 @@ def receive(self):
# sort in the order of task_idx
messages = sorted(messages, key=itemgetter(0))

atpbar.flush()

return messages

def _receive_finished(self):
Expand Down Expand Up @@ -171,6 +175,8 @@ def close(self):
self.task_queue.join()
self.workers = [ ]

atpbar.flush()

##__________________________________________________________________||
import logging
class Worker(threading.Thread):
Expand Down

0 comments on commit 228ab03

Please sign in to comment.