threading
The threading module provides high-level thread support with a Thread class and classes for various synchronization primitives. It’s built using the lower-level thread module.
The following utility functions are available:
activeCount()
Returns the number of currently active Thread objects.
currentThread()
Returns the Thread object corresponding to the caller’s thread of control.
enumerate()
Returns a list of all currently active Thread objects.
local()
Returns a local object that allows for the storage of thread-local data. This object is guaranteed to be unique in each thread.
setprofile(func)
Sets a profile function that will be used for all threads created. func is passed to sys.setprofile() before each thread starts running. ...
Get Python: Essential Reference, Third Edition 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.