Hi all,
I am new to Twisted, please be gentle :)
The Twisted application I am dealing with is python-vnc-viewer (http://python-vnc.viewer.googlecode.com). We are attempting the RFB library implemented using Twisted in our application, to bring up a customer viewer. Our uses a threading model that is quite centric to our application.
Is it possible to ask the Twisted application to run in a sea prate thread?
Thanks.
Hi Devraj,
Is it possible to ask the Twisted application to run in a sea prate thread?
Yes it is possible. Simply start the reactor in a thread, but run it as:
reactor.run(installSignalHandlers=False)
If you do it this way you're going to have to handle signals yourself.
You're going to have to be very careful about calling code in the Twisted thread from other threads as Twisted isn't threadsafe. To do this properly take a look at reactor.callFromThread.
Cheers, Reza