Skip to content

Commit

Permalink
Merge pull request #394 from atsampson/fixdeadlock
Browse files Browse the repository at this point in the history
Fix ld-decode deadlock on exit.
  • Loading branch information
happycube committed Jan 1, 2020
2 parents 5e9330b + 47c4ade commit 9303587
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lddecode/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,10 @@ def __init__(self, rf, infile, loader, cachesize = 128, num_worker_threads=6, MT
def end(self):
# stop workers
for i in self.threads:
if i.is_alive():
self.q_in.put(None)
self.q_in.put(None)

for t in self.threads:
if t.is_alive():
t.join()
t.join()

self.q_out.put(None)

Expand Down

0 comments on commit 9303587

Please sign in to comment.