[Twisted-Python] How many threads in an application
L. Daniel Burr
ldanielburr at mac.com
Tue May 23 13:41:39 MDT 2006
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
More information about the Twisted-Python
mailing list