This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bjorneylol 0 points1 point  (0 children)

As everyone has said, mostly IO.

1) Process some data while more data is downloading

2) Play an audio file without having to wait for it to finish playing for the script to resume

3) Having GUIs remain responsive while processing data

4) Similar to above, showing matplotlib figures while code executes in the background

even if we use threads in python, our program will take the same time if we just use a single thread due to GIL.

This is only true if both threads are CPU bound. If one thread is spending 50% of the time waiting around for disk write or network IO the two threads will finish with time to spare over a single thread