You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the script below to recreate the problem. It takes some time (400-800 writes) with it, but happens to me far more often with real world applications.
I think this happens because of concurrent access to sys.stdout.write() by the spinning thread and the spinners write(). This should be solvable by using a threading.Lock() and guarding access to sys.stdout.write() with it. In a quick local hack-fix-test it worked for me by doing this in write() and _spin(), but there are a lot more functions that would need guarding, if done right.
The text was updated successfully, but these errors were encountered:
When I use
write()
a lot on a spinner it often happens to me that the written text is displayed after the spinner message, like this:I used the script below to recreate the problem. It takes some time (400-800 writes) with it, but happens to me far more often with real world applications.
I think this happens because of concurrent access to
sys.stdout.write()
by the spinning thread and the spinnerswrite()
. This should be solvable by using athreading.Lock()
and guarding access to sys.stdout.write() with it. In a quick local hack-fix-test it worked for me by doing this inwrite()
and_spin()
, but there are a lot more functions that would need guarding, if done right.The text was updated successfully, but these errors were encountered: