Regarding Thread pooling

Discussion in 'Python' started by sujata, Jul 15, 2003.

  1. sujata

    sujata Guest

    Hi,
    I have a query regarding threads.
    Is it possible to create thread pools in python.i.e. create threads and then retrieve the memory allocated to it so that the same threads can be used over and over again rather than creating new threads each time i wish to execute functions many times. If its possible plz do let me know how to do so.
    Can one have control over memory this way?

    Thanking You.
    ----------------
    Regards,
    Sujata Y
    sujata, Jul 15, 2003
    #1
    1. Advertising

  2. sujata

    Aahz Guest

    In article <>,
    sujata <> wrote:
    >
    > I have a query regarding threads.
    >Is it possible to create thread pools in python.i.e. create threads and =
    >then retrieve the memory allocated to it so that the same threads can be =
    >used over and over again rather than creating new threads each time i =
    >wish to execute functions many times. If its possible plz do let me know =
    >how to do so.
    >Can one have control over memory this way?


    Certainly. What you need to do is set up a while loop in each thread
    that picks up work from a Queue. One of the work types contains a flag
    that tells the loop to exit. (There are other ways, but that's the
    simplest and most straightforward.)
    --
    Aahz () <*> http://www.pythoncraft.com/

    "Not everything in life has a clue in front of it...." --JMS
    Aahz, Jul 15, 2003
    #2
    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. Trevor Hartman

    connection pooling

    Trevor Hartman, Jul 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    555
    Mark Heimonen
    Jul 28, 2003
  2. Gary

    .net thread pooling problem

    Gary, Aug 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    341
  3. Chris Szabo

    connection pooling error

    Chris Szabo, Aug 19, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    1,870
    Chris Szabo
    Aug 19, 2003
  4. Saverio M.

    Customized Thread pooling

    Saverio M., Jul 3, 2006, in forum: Java
    Replies:
    1
    Views:
    378
    Robert Klemme
    Jul 3, 2006
  5. Giovanni Azua

    NIO multiplexing + thread pooling

    Giovanni Azua, Sep 24, 2011, in forum: Java
    Replies:
    16
    Views:
    1,792
    Robert Klemme
    Sep 30, 2011
Loading...

Share This Page