[Twisted-Python] re-entrancy question
I've got a Twisted server application that also listens for other types of TCP connections on another port. Upon receiving certain data on that other port, I make calls to objects subclassed from pb.Avatar. Given that Twisted runs on one loop doing select(), I think I have a re-entrancy situation. Is this: 1) dangerous? 2) why is it dangerous? 3) and how would I go about achieving what I want safely?
On Tue, 08 Feb 2005 01:32:51 -0800, apocalypznow
I've got a Twisted server application that also listens for other types of TCP connections on another port. Upon receiving certain data on that other port, I make calls to objects subclassed from pb.Avatar. Given that Twisted runs on one loop doing select(), I think I have a re-entrancy situation. Is this: 1) dangerous? 2) why is it dangerous? 3) and how would I go about achieving what I want safely?
Are all of your TCP connections handled by Twisted? If that is the case, and you're not doing anything weird with threads or something, then you have no re-entering going on, and it is not dangerous at all. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | -- http://radix.twistedmatrix.com | Release Manager, Twisted Project \\\V/// | -- http://twistedmatrix.com |o O| | Founding Member, Hobart Hacking Society w----v----w-+ -- http://hackingsociety.org/chapters/hash
I have a TCP connection handled by socket calls, not through Twisted. It is because the app on the other end of the socket call can not run a Twisted reactor. Christopher Armstrong wrote:
On Tue, 08 Feb 2005 01:32:51 -0800, apocalypznow
wrote: I've got a Twisted server application that also listens for other types of TCP connections on another port. Upon receiving certain data on that other port, I make calls to objects subclassed from pb.Avatar. Given that Twisted runs on one loop doing select(), I think I have a re-entrancy situation. Is this: 1) dangerous? 2) why is it dangerous? 3) and how would I go about achieving what I want safely?
Are all of your TCP connections handled by Twisted? If that is the case, and you're not doing anything weird with threads or something, then you have no re-entering going on, and it is not dangerous at all.
On Tue, 2005-02-08 at 09:42 -0800, apocalypznow wrote:
I have a TCP connection handled by socket calls, not through Twisted. It is because the app on the other end of the socket call can not run a Twisted reactor.
It doesn't matter what the other side is using, you can still use Twisted's TCP support on your side.
participants (3)
-
apocalypznow
-
Christopher Armstrong
-
Itamar Shtull-Trauring