diff --git a/bin/slave.py b/bin/slave.py index aafe5bf..e2d4cf1 100644 --- a/bin/slave.py +++ b/bin/slave.py @@ -63,5 +63,9 @@ if __name__ == '__main__': shutdown = False while not shutdown: + # this sleep prevents a race condition in work(): someone putting + # themselves in as ready, pulling someone elses's shutdown signal, then + # putting their name in again. time.sleep(5) + shutdown = work(inq, outq, g, myname)