Improve thread handling
This commit is contained in:
parent
e5130da9e5
commit
f916cca064
1 changed files with 2 additions and 2 deletions
|
@ -41,12 +41,12 @@ if __name__ == "__main__":
|
|||
threads = []
|
||||
|
||||
for card in getFile():
|
||||
t = threading.Thread(target=getBalance, args=(card["number"], card["ccn"], q, eq))
|
||||
t = threading.Thread(target=getBalance, args=(card["number"], card["ccn"], q, eq), daemon=True)
|
||||
t.start()
|
||||
threads += [t]
|
||||
|
||||
for t in threads:
|
||||
t.join()
|
||||
t.join(10)
|
||||
|
||||
if not eq.empty():
|
||||
exc = eq.get()
|
||||
|
|
Loading…
Reference in a new issue