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