[Twisted-Python] How many threads in an application

Christian Schneider schneider at gl-systemhaus.de
Tue May 23 15:59:15 EDT 2006


Hi Daniel,

thanks, that's what I've been thinking but it's good to have it  
confirmed.

chris

On 23.05.2006, at 21:41, L. Daniel Burr wrote:

> Hi Chris,
>
>
> On Tue, 23 May 2006 14:24:26 -0500, Christian Schneider  
> <schneider at gl-systemhaus.de> wrote:
>
>> Hi all,
>>
>> I have implemented a server as a subclass of t.i.TCPServer and  
>> have it running as a twistd application. Within the service, I  
>> have several callbacks. Let's say I have three connected  
>> protocols, how many threads to I have? Just one or more. The  
>> callbacks are scheduled via reactor.callLater.
>>
>> Thanks,
>>
>> chris
>
> The really cool thing about twisted is, in your case, you probably  
> have no threads running, other than the main thread of execution,  
> which is the reactor.  Twisted is handling your protocols  
> asynchronously, rather than using threads, and this is a Good  
> Thing, in terms of scalability and reliability.
>
> L. Daniel Burr
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python





More information about the Twisted-Python mailing list