python::AsyncCallThread::AsyncCallThread Class Reference

List of all members.

Public Member Functions

def __init__
def run

Public Attributes

 callback
 func
 args
 kwds
 result
 exception
 start_time
 stop_time

Detailed Description

Asynchronous function call thread.  The result of call
func(*args,**kwds) is stored in the result attribute.  If an exception is
raised the exception object is stored in the exception
attribute. Otherwise the exception attribute is None.  The caller is
notified with the callback(t) where t is this thread object.

Definition at line 10 of file AsyncCallThread.py.


Member Function Documentation

def python::AsyncCallThread::AsyncCallThread::__init__ (   self,
  callback,
  func,
  args,
  kwds 
)

Definition at line 12 of file AsyncCallThread.py.

00017                                                      :
00018         Thread.__init__(self,name = 'async_call_%s'%func.__name__)
00019         self.callback = callback
00020         self.func = func
00021         self.args = args
00022         self.kwds = kwds
00023         self.result = None
        self.exception = None

def python::AsyncCallThread::AsyncCallThread::run (   self  ) 

Definition at line 24 of file AsyncCallThread.py.

00029                  :
00030         self.start_time = time.time()
00031 
00032         try:
00033             print "Making asynchronous call:",self.func.__name__,self.args,self.kwds
00034             self.result = self.func(*self.args,**self.kwds)
00035         except Exception,x:
00036             self.exception = x


Member Data Documentation

python::AsyncCallThread::AsyncCallThread::args

Definition at line 16 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::callback

Definition at line 14 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::exception

Definition at line 19 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::func

Definition at line 15 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::kwds

Definition at line 17 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::result

Definition at line 18 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::start_time

Definition at line 20 of file AsyncCallThread.py.

python::AsyncCallThread::AsyncCallThread::stop_time

Definition at line 21 of file AsyncCallThread.py.


The documentation for this class was generated from the following file:
Generated on Fri Mar 5 09:25:41 2010 for gbs by  doxygen 1.4.7