Intro. to Python Threading

There are two modules available in Python:

  • threading - Recommended.
  • thread - Deprecated already. Not available in Python3.

You MUST have crystal concepts of processes such like:

  • What is thread.
  • How the OS process works?
  • What are parent/child processes?
  • How the data exchange among processes?
  • What are the problems encountered in parallel processing.

to understand how thread works.

In order to understand how process work, you can learn this from Linux LPIC-1, Intro. to UNIX/Linux classes or other equivalent ones.

Single process has at least a single thread, this is the default process behavior. A single process can also have multi-threads, this requires clear and in-depth understanding as regards to how inter-process works. Or, you may make a simple threading script works but very difficult to enhance and improve it.

Official Python3 threading doc

Reference from Intro. to Python threads