Python threading module

Python manages threads with the threading module provided by the Python standard library. This module provides some very interesting features that make the threading-based approach a whole lot easier; in fact, the threading module provides several synchronization mechanisms that are very simple to implement.

The major components of the threading module are as follows:

  • The thread object
  • The lock object
  • The RLock object
  • The semaphore object
  • The condition object
  • The event object

In the following recipes, we examine the features offered by the threading library with different application examples. For the examples that follow, we will refer to the Python 3.5.0 distribution (https://www.python.org/downloads/release/python-350/).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.220.120