Skip to Content
Python: Essential Reference, Third Edition
book

Python: Essential Reference, Third Edition

by David Beazley
February 2006
Intermediate to advanced content levelIntermediate to advanced
648 pages
14h 53m
English
Sams
Content preview from Python: Essential Reference, Third Edition

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python: Essential Reference

Python: Essential Reference

David M. Beazley

Publisher Resources

ISBN: 0672328623Purchase book