Recently python3 need to use multiple threads to handle large data, take the opportunity to explore a bit, the situation python3 threading model, and briefly record the following;
Multi-threaded operating advantages:
- The program uses threads can take a long time to deal with the task into the background;
- The user interface can be more attractive, and does not clog interface operation;
- Running at higher speeds;
- Full use of the characteristics of a multi-core CPU for processing;
Kernel threads: and revoked by the operating system kernel created;
User threads: do not need kernel support for threads implemented in the user program;
Python3 multithreading:
- _thread provided some of the original multi-threaded program api for writing;
- threading provides a more convenient interface
- Both are built-in threading module python3
Kept up to date, please indicate the source, please pay attention to more cnblogs.com/xuyaowen;