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

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.