17.5. threading Module

We will now introduce the higher-level threading module which gives you not only a Thread class but also a wide variety of synchronization mechanisms to use to your heart's content. Table 17.2 represents a list of all the objects which are provided for in the threading module.

Table 17.2. threading Module Objects
threading Module ObjectsDescription
Threadobject which represents a single thread of execution
Lockprimitive lock object (same lock object as in the thread module)
RLockre-entrant lock object provides ability for a single thread to (re)acquire an already-held lock (recursive locking)
Conditioncondition variable object causes one thread to wait until a certain “condition” has been satisfied by another thread, such ...

Get Core Python Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.