diff --git a/balance.py b/balance.py index 276e803..6006320 100755 --- a/balance.py +++ b/balance.py @@ -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()