A Solution using Tasks Re: [Stackless] Suggestion for a Solution ?

Discussion in 'Python' started by Andrew Francis, Jun 28, 2006.

  1. Hello Patrick:

    --- "Patrick M. Nielsen" <> 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
    Andrew Francis, Jun 28, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TheDustbustr

    stackless python: continuation module?

    TheDustbustr, Jul 25, 2003, in forum: Python
    Replies:
    2
    Views:
    452
    Christian Tismer
    Aug 6, 2003
  2. Christian Tismer
    Replies:
    0
    Views:
    305
    Christian Tismer
    Aug 14, 2003
  3. Christian Tismer

    Zope 2.7 running with Stackless 3.0

    Christian Tismer, Aug 28, 2003, in forum: Python
    Replies:
    0
    Views:
    314
    Christian Tismer
    Aug 28, 2003
  4. Replies:
    1
    Views:
    388
  5. Christos Kokaliaris
    Replies:
    45
    Views:
    210
    Jorgen Grahn
    Jun 16, 2014
Loading...

Share This Page