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

thread

The thread module provides the following low-level functions for working with threads. This module is available only on UNIX and Windows.

						allocate_lock()

Creates a new lock object of type LockType. Locks are initially unlocked.

						exit()

Raises the SystemExit exception. Forces a thread to exit.

						get_ident()

Returns the integer “thread identifier” of the current thread.

						interrupt_main()

Raises a KeyboardInterrupt exception in the main thread.

						start_new_thread(func, args [, kwargs])

Executes the function func in a new thread. func is called using apply(func, args, kwargs). On success, control is immediately returned to the caller. When the function func returns, the thread exits silently. If the function terminates with an unhandled exception, ...

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