First page Back Continue Last page Overview Graphics
Sample Code – thread loop
result=exception=None
callfunc, args, resultfunc, resargs = queue.get()
try:
result=callfunc(*args)
except:
exception=sys.exc_info()[1]
wx.PostEvent(RESULT_EVENT,
(resultfunc, resargs, exception, result))
Notes:
This is the loop in the worker thread which does the call, captures the results and exceptions and passes them back.