[Twisted-Python] connection pool

Thomas Hervé therve at free.fr
Thu Jan 17 01:35:32 MST 2008


Quoting Tjerk.Kusters at imtech.nl:


> The call can take some time because I have to wait on a response from a
> CORBA call.
>
> I have looked at deferred's, but can not see how this can be used to solve
> the problem. The render_GET(self, request) can only return when there is an
> answer.
>
> Is there a way to make twisted web to handle multi connections at the same
> time?

You're misunderstanding something. twisted.web can handle multiple  
connections without problems. I think your problem is that you're  
making a blocking call (CORBA) inside the reactor loop, which prevents  
other connections to happen. If you don't manage to find an  
asynchronous CORBA client, you should do the call inside a thread,  
using reactor.callInThread for example.

However, it would be easier to help you with an example of your code  
or a more detailed description of your problem.

-- 
Thomas





More information about the Twisted-Python mailing list