Re: Share Work Queue
Andrew Maizels <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <CACETAqhZLg=zTzCeBO==_Mbhthq+n9ND4pcCDRdd5BVYDKHYag@mail.gmail.com> |
You can use the Python Queue module for that - it's designed to work transparently across multiple threads. On Sun, Mar 27, 2016 at 10:31 AM, ray malone <[email protected]> wrote: > I would like to build a process that runs in a seperate thread from > CherryPy but receives messages via a shared Queue. > > Something Like: > > # Start new Threads > thread1.start() ## Worker One > thread2.start() ## Worker 2 > > > cherrypy.tree.mount(HelloWorld(), '/') > cherrypy.engine.start() > cherrypy.engine.block() > > > Inside of HellowWorld() I would like to be able to access a shared Queue > between all of the Threads 1,2, and CherryPy. > > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "cherrypy-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > Visit this group at https://groups.google.com/group/cherrypy-users. > For more options, visit https://groups.google.com/d/optout. > -- Ahh... We are all heroes; you and Boo and I. Hamsters and rangers everywhere, rejoice! Read Peopleware! http://www.amazon.com/Peopleware-Productive-Projects-Teams-Second/dp/0932633439 -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.