in reply to Re: Thread::Pool shutdown dies after abort
in thread Thread::Pool shutdown dies after abort

I really like this approach, because it clearly delineates “the units of work that are to be processed” from “the pool of worker-bees that is responsible for processing them.”

There should be enough threads/processes available to allow them to process the incoming requests expediently without unreasonable backlogs ... but they should process many requests during their lifetime, pulling them from a nice, thread-safe queue.   BrowserUK's solution clearly demonstrates just how easy that is.

A fast-food restaurant uses exactly the same system to churn out hundreds of grease-burgers to five simultaneous lines in the lobby, as well as one or sometimes two drive-thru windows, using just a handful of grossly-underpaid employees.   And no workers are murdered by their manager during the entire shift.

Replies are listed 'Best First'.
Re^3: Thread::Pool shutdown dies after abort
by Anonymous Monk on Jul 04, 2011 at 14:48 UTC
    Thanks Monks for your answers. I think an approved thread pool package is needed with all the trimmings.
      I think an approved thread pool package is needed with all the trimmings.

      Why? What do you need that this does not do?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.