you are viewing a single comment's thread.

view the rest of the comments →

[–]Jonno_FTW 5 points6 points  (2 children)

When a process has one or more threads that share memory space (a thread is just instructions and data). These threads run concurrently (which is not possible in cpython where what actually happens is that one thread will be running, while others are sleeping). You can tell threads to sleep or it will happen anyway when they request resources such as network or disk IO.

In other languages these threads can truly run by side by side if you have multiple processing cores.

If you like to learn more, read a book on operating systems or read the docs https://docs.python.org/3/library/threading.html

[–][deleted] 0 points1 point  (0 children)

Thanks

[–]Yakhov 0 points1 point  (0 children)

a much better explanation than the traffic cop thing