added explanation for extra sleeping in while loop
This commit is contained in:
parent
16bfca3bd5
commit
3e6018aa45
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user