6 Oct
2003
6 Oct
'03
9:30 p.m.
On Tue, 7 Oct 2003 12:23:18 +1000 Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
q = Queue.Queue() reactor.callFromThread(func, q, arg1, arg2) result = q.get()
Especially seeing as the latter requires cluttering 'func' with details of how to get the result back (i.e. a call to q.put), when the solution I proposed in my previous email would make it transparent.
t.i,threads should indeed have a utility function that does this for you. It would need to turn Failures into exceptions and deal transparently with Deferreds, of course. -- Itamar Shtull-Trauring http://itamarst.org/ Available for Python & Twisted consulting