Process: One execution of a program
Threads: Basic scheduling Unit for CPUs
Each process provides the resources needed to execute the program. A process has a virtual address space, execute code, open handle system objects, a secure situational awareness, a unique process identifier, environment variables, a priority class, minimum and maximum working dimensions, at least one thread of execution, and each process starts with a thread, called the main path, The main thread can create multiple child threads
A process is a collection of CPU-bound instructions that, in a single-core CPU, can only perform one task at a time. For example, in a factory, at the same time a workshop can only have one workshop to work, other workshops can only wait.
Thread:
A thread is the basic CPU dispatch unit.
For example: If you are reading a book, you have something to pause, after a while you come back and want to continue reading (from the point you paused to continue reading), if you want to write down the page number, line number, letter number. So you need to remember these three numbers for reading.
Join you have a bedroom where you use the above techniques to join in after a break to re-read a book that you can quickly recover in any place.
The same thread is the same reason, a CPU will give people an illusion at the same time the CPU to do multiple calculations. It takes a little time to count on each one.
No matter how many threads you start, how many CPUs you have, Python will only allow one thread to run at the same time while executing, wiping ... , then what is it called multithreading? This early conclusion of the knot, listen to my live talk.
Python route Nineth _ Threads and processes