Commit f916cca0 authored by Klaus-Uwe Mitterer's avatar Klaus-Uwe Mitterer

Improve thread handling

parent e5130da9
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment