February 2006
Intermediate to advanced
648 pages
14h 53m
English
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, ...