Why does the addition of a sleep time code of 1 second in python affect the execution of multithreading?

go straight to the code:

   

curiously, what is the cause of this? Please explain. Thank you.

Mar.16,2021

Terminal and Debug console

< hr >

Update

first of all, I declare that there is no such situation as you mentioned under my Ubuntu16.04,python3.5, so I guess I doubt the picture you posted.
also, please paste the code correctly when asking questions. Some of the punctuation marks in your code are wrong, and no one wants to help you correct the punctuation error.

answer

in order to reproduce your problem
I modified it:


<br>thread.join

task = []
for i in range(20):
    t = threading.Thread(target=worker, args=(i,), name="t.%d" % i)
    t.start()
    task.append(t)

for t in task:  -sharp
    t.join() 
Menu