O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required