Hello Patrick:

--- "Patrick M. Nielsen" <[EMAIL PROTECTED]> wrote:

> I had a similar problem, and Radix's threadless
> Twisted snippet proved to be
> a very viable solution
> 
> Have a look at:
>
>http://twistedmatrix.com/trac/browser/sandbox/radix/threadless.py?rev=17407

Thanks for the advice. Bob Ippolito also suggested
this. However I have been experimenting with the
Twisted task class.

I am still testing but I have done the following with
success.

1. Set up a function -

def pump():
    stackless.schedule()

2. l = task.LoopingCall(pump)
   l.start(some_time_period)
   reactor.listenTCP(port, MyHttpFactory())
   reactor.run()

While Twisted waits for a connection, the call to
pump() allows other tasklets that are waiting, a
chance to run.

Once I know all the ins-and-outs, I will write this up
in the Wiki including an example.

Thanks for everyone's help.

Cheers,
Andrew


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to