----- Original Message -----
From: "James R. Saker Jr." <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, January 16, 2006 8:56 PM
Subject: [Twisted-web] Deferred fun
--- snip ---
you do not understand deferreds. a deferred is a means to register success
and error handlers for an asynchronous operation. it is *not* a means to
asynchronously invoke an operation, as you seem to think with
"d.addCallback(self.handleScan(type, ip, detectOS, timing))". moreover, the
'start a blocking program with popen' is, of course, a *blocking* operation
and using twisted/deferreds/a rabbit foot is not going to make it
asynchronous automagically. i suggest you read the excellent introductory
documentation on twistedmatrix.com.
hints on how to make this work:
call handleScan with tiwsted.internet.threads.deferToThread(). this gives
you a deferred; add a callback to this deferred which returns the result to
your xmlrpc client.
also, this should be on the main twisted-l, not on twisted-web.
-p
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web