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

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

 
Modules
            
sys
 
Classes
            
_Verbose
Thread
_DummyThread
_MainThread
_Timer
_Condition
_Event
_RLock
_Semaphore
_BoundedSemaphore
 
class Thread(_Verbose)
       
   Methods defined here:
_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)
_set_daemon(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
run(self)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions defined here:
_Thread__initialized = 0
__doc__ = None
__module__ = 'threading'

Methods inherited from _Verbose:
_note(self, format, *args)
 
class _BoundedSemaphore(_Semaphore)
      Semaphore that checks that # releases is <= # acquires
 
  
Method resolution order:
_BoundedSemaphore
_Semaphore
_Verbose

Methods defined here:
__init__(self, value=1, verbose=None)
release(self)

Data and non-method functions defined here:
__doc__ = 'Semaphore that checks that # releases is <= # acquires'
__module__ = 'threading'

Methods inherited from _Semaphore:
acquire(self, blocking=1)

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

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

Methods inherited from _Verbose:
_note(self, format, *args)
 
class _DummyThread(Thread)
       
  
Method resolution order:
_DummyThread
Thread
_Verbose

Methods defined here:
__init__(self)
_set_daemon(self)
join(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

Methods inherited from Thread:
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__repr__(self)
getName(self)
isAlive(self)
isDaemon(self)
run(self)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions inherited from Thread:
_Thread__initialized = 0

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

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

Methods inherited from _Verbose:
_note(self, format, *args)
 
class _MainThread(Thread)
       
  
Method resolution order:
_MainThread
Thread
_Verbose

Methods defined here:
_MainThread__exitfunc = __exitfunc(self)
__init__(self)
_set_daemon(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

Methods inherited from Thread:
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__repr__(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
run(self)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions inherited from Thread:
_Thread__initialized = 0

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

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

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

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'

Methods inherited from _Verbose:
_note(self, format, *args)
 
class _Timer(Thread)
      Call a function after a specified number of seconds:
 
t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.cancel() # stop the timer's action if it's still waiting
 
  
Method resolution order:
_Timer
Thread
_Verbose

Methods defined here:
__init__(self, interval, function, args=[], kwargs={})
cancel(self)
Stop the timer if it hasn't finished yet
run(self)

Data and non-method functions defined here:
__doc__ = "Call a function after a specified number of sec...p the timer's action if it's still waiting\n "
__module__ = 'threading'

Methods inherited from Thread:
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__repr__(self)
_set_daemon(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions inherited from Thread:
_Thread__initialized = 0

Methods inherited from _Verbose:
_note(self, format, *args)
 
class _Verbose
       
   Methods defined here:
__init__(self, verbose=None)
_note(self, format, *args)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'threading'
 
Functions
            
BoundedSemaphore(*args, **kwargs)
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)
Timer(*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(function, args[, kwargs])
(start_new() is an obsolete synonym)
 
Start a new thread and return its identifier.  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.2/threading.pyc'
__name__ = 'threading'
_active = {1024: <_MainThread(MainThread, started)>}
_active_limbo_lock = <thread.lock object>
_counter = 0
_limbo = {}