[Twisted-Python] Migrate Asyncore to Twisted

jian wu hellojianwu at gmail.com
Thu Mar 15 13:36:02 MDT 2007


Hi,

> Twisted doesn't need threads for this at all. Nor does asyncore.

>From what I understand, it is better using threads to offload any
blocking operation out of Twisted main event loop unless all your
message processing is non-blocking or "light-weight and fast"
( Sometimes message processing plus state management could
 be heavy operations ).

Best regards,

Jian


On 3/15/07, Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
> On Wed, 2007-03-14 at 23:38 -0700, jian wu wrote:
> > Hi Sean,
> >
> > > Even with asyncore I don't need two threads per connection. The
> > > asyncore loop handles the send and receive just fine.
> >
> > I think that I had better correcting my term as "4 types of threads" or
> > "4 types of threading tasks" since Twisted has a thread pool, so you
> > don't need start thread by your python code, you just submit your
> > task to Twisted Thread Pool, it'll schedule and run for you.
>
> Twisted doesn't need threads for this at all. Nor does asyncore.
>
>
> _______________________________________________
> 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