Skip to content

Commit

Permalink
comment out thread debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tuck1s committed Aug 19, 2022
1 parent 329a734 commit e839cbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/consume-mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,11 @@ def findFreeThreadSlot(th, thIdx):
t = (thIdx+1) % len(th)
while True:
if th[t] == None: # empty slot
print(totalWait)
# print(totalWait) # debug
return t
elif not th[t].is_alive(): # thread just finished
th[t] = None
print(totalWait)
# print(totalWait) # debug
return t
else: # keep searching
t = (t+1) % len(th)
Expand All @@ -551,7 +551,6 @@ def findFreeThreadSlot(th, thIdx):
time.sleep(sleepTime)
totalWait += sleepTime
if totalWait >= maxSleepTime:
print('Waited {} seconds for a free thread - exiting'.format(totalWait))
return None

# Wait for threads to complete, marking them as None when done. Get logging results text back from queue, as this is
Expand Down

0 comments on commit e839cbd

Please sign in to comment.