threading
index
/usr/lib/python2.1/threading.py

Proposed new threading module, emulating a subset of Java's threading model.

 
Modules
            
sys

 
Classes
            
_Verbose
Thread
_DummyThread
_MainThread
_Condition
_Event
_RLock
_Semaphore

 
class Thread(_Verbose)
       
  
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__init__(self, group=None, target=None, name=None, args=(), kwargs={}, verbose=None)
__repr__(self)
_note(self, format, *args) from _Verbose
_set_daemon(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
run(self)
setDaemon(self, daemonic)
setName(self, name)
start(self)

 
class _Condition(_Verbose)
       
  
__init__(self, lock=None, verbose=None)
__repr__(self)
_acquire_restore(self, x)
_is_owned(self)
_note(self, format, *args) from _Verbose
_release_save(self)
notify(self, n=1)
notifyAll(self)
wait(self, timeout=None)

 
class _DummyThread(Thread)
       
  
_Thread__bootstrap = __bootstrap(self) from Thread
_Thread__delete = __delete(self) from Thread
_Thread__stop = __stop(self) from Thread
__init__(self)
__repr__(self) from Thread
_note(self, format, *args) from _Verbose
_set_daemon(self)
getName(self) from Thread
isAlive(self) from Thread
isDaemon(self) from Thread
join(self)
run(self) from Thread
setDaemon(self, daemonic) from Thread
setName(self, name) from Thread
start(self) from Thread

 
class _Event(_Verbose)
       
  
__init__(self, verbose=None)
_note(self, format, *args) from _Verbose
clear(self)
isSet(self)
set(self)
wait(self, timeout=None)

 
class _MainThread(Thread)
       
  
_MainThread__exitfunc = __exitfunc(self)
_Thread__bootstrap = __bootstrap(self) from Thread
_Thread__delete = __delete(self) from Thread
_Thread__stop = __stop(self) from Thread
__init__(self)
__repr__(self) from Thread
_note(self, format, *args) from _Verbose
_set_daemon(self)
getName(self) from Thread
isAlive(self) from Thread
isDaemon(self) from Thread
join(self, timeout=None) from Thread
run(self) from Thread
setDaemon(self, daemonic) from Thread
setName(self, name) from Thread
start(self) from Thread

 
class _RLock(_Verbose)
       
  
__init__(self, verbose=None)
__repr__(self)
_acquire_restore(self, (count, owner))
_is_owned(self)
_note(self, format, *args) from _Verbose
_release_save(self)
acquire(self, blocking=1)
release(self)

 
class _Semaphore(_Verbose)
       
  
__init__(self, value=1, verbose=None)
_note(self, format, *args) from _Verbose
acquire(self, blocking=1)
release(self)

 
class _Verbose
       
  
__init__(self, verbose=None)
_note(self, format, *args)

 
Functions
            
Condition(*args, **kwargs)
Event(*args, **kwargs)
Lock = allocate_lock(...)
allocate_lock() -> lock object
(allocate() is an obsolete synonym)
 
Create a new lock object.  See LockType.__doc__ for information about locks.
RLock(*args, **kwargs)
Semaphore(*args, **kwargs)
_allocate_lock = allocate_lock(...)
allocate_lock() -> lock object
(allocate() is an obsolete synonym)
 
Create a new lock object.  See LockType.__doc__ for information about locks.
_get_ident = get_ident(...)
get_ident() -> integer
 
Return a non-zero integer that uniquely identifies the current thread
amongst other threads that exist simultaneously.
This may be used to identify per-thread resources.
Even though on some platforms threads identities may appear to be
allocated consecutive numbers starting at 1, this behavior should not
be relied upon, and the number should be seen purely as a magic cookie.
A thread's identity may be reused for another thread after it exits.
_newname(template='Thread-%d')
_pickSomeNonDaemonThread()
_sleep = sleep(...)
sleep(seconds)
 
Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.
_start_new_thread = start_new_thread(...)
start_new_thread(functon, args[, kwargs])
(start_new() is an obsolete synonym)
 
Start a new thread.  The thread will call the function with positional
arguments from the tuple args and keyword arguments taken from the optional
dictionary kwargs.  The thread exits when the function returns; the return
value is ignored.  The thread will also exit when the function raises an
unhandled exception; a stack trace will be printed unless the exception is
SystemExit.
_test()
_time = time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
activeCount()
currentThread()
enumerate()

 
Data
             _VERBOSE = 0
__file__ = '/usr/lib/python2.1/threading.pyc'
__name__ = 'threading'
_active = {1024: <_MainThread(MainThread, started)>}
_active_limbo_lock = <lock object>
_counter = 0
_limbo = {}