-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Race condition with tqdm.write #759
Copy link
Copy link
Closed
Labels
p0-bug-critical ☢Exception rasingException rasingquestion/docs ‽Documentation clarification candidateDocumentation clarification candidatesynchronisation ⇶Multi-thread/processingMulti-thread/processing
Milestone
Metadata
Metadata
Assignees
Labels
p0-bug-critical ☢Exception rasingException rasingquestion/docs ‽Documentation clarification candidateDocumentation clarification candidatesynchronisation ⇶Multi-thread/processingMulti-thread/processing
tqdm.write()appears to have a race condition that triggers occasionally:This fixes it:
The issue appears to be in
get_lock:If two threads call this at the same time then the
cls._lockwill be overwritten, andcls._lock.release()at the end ofexternal_write_modewill release the wrong lock.