Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81656

Re: Fwd: Python Signal/Slot + QThred code analysis

Date 2014-11-27 17:54 -0700
From Michael Torrie <torriem@gmail.com>
Subject Re: Fwd: Python Signal/Slot + QThred code analysis
References (12 earlier) <5476A48C.1050607@gmail.com> <CAAp0bGtirGVFRAdE3-eosTVfwTAeLO0-XcPyY7+JVSsujqs7bg@mail.gmail.com> <5477AB1E.3030609@gmail.com> <CAAp0bGvR+AUiedDdw6KLTmBjJ-PSKvxEnwCxbRj7xB7isFEvMg@mail.gmail.com> <CAAp0bGvypnRutp5MmRV6sOu2iU267TbB-yeyteUN9kH6twVKKw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16387.1417136088.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 11/27/2014 04:29 PM, Juan Christian wrote:
> Is that right? But I don't think that always calling the site this way is
> good for them and for me, sometimes I may not get new users for like 10~15
> minutes, so I would have wasted a lot of calls for nothing. That's why I
> only instantiate/call the site when I get new users.

So the real problem with instantiating a worker thread for every request
is that you have to hold onto a reference to the worker long enough for
the work to be done.  Your original code was not doing this, so had it
worked, the thread would have been aborted before it even started its
work, as soon as the worker instance went out of scope.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Fwd: Python Signal/Slot + QThred code analysis Michael Torrie <torriem@gmail.com> - 2014-11-27 17:54 -0700

csiph-web