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

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; 'subject: + ': 0.07; 'subject:code': 0.07; 'worked,': 0.09; 'thread': 0.14; 'aborted': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'scope.': 0.16; 'subject:analysis': 0.16; 'wrote:': 0.18; 'users.': 0.18; 'work,': 0.20; 'header:User-Agent:1': 0.23; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'went': 0.31; 'code': 0.31; 'problem': 0.35; 'done.': 0.35; 'but': 0.35; 'minutes,': 0.36; 'right?': 0.36; 'doing': 0.36; 'christian': 0.38; 'sometimes': 0.38; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'users': 0.40; 'even': 0.60; 'new': 0.61; 'subject:Fwd': 0.61; 'real': 0.63; 'soon': 0.63
X-Virus-Scanned amavisd-new at torriefamily.org
Date Thu, 27 Nov 2014 17:54:41 -0700
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11
MIME-Version 1.0
To python-list@python.org
Subject Re: Fwd: Python Signal/Slot + QThred code analysis
References <CAAp0bGttki1B=1q5SX_C39L_dRB22YOQiTbVxdvo4jSee0srcw@mail.gmail.com> <CAAp0bGsgMTK7MS1Wvh13304et7Bb7XUyfZTU8ZmF2++BuLj7dw@mail.gmail.com> <5473E188.5020608@gmail.com> <CAAp0bGtYCEWNLV7tnR6O5N706_3AkO9XRBs1pNP8TCxfctUyow@mail.gmail.com> <5474A333.2090207@mrabarnett.plus.com> <CAAp0bGsGLsWoXQnqFYN3KLeUsmcD5ujF80sasM16wx70zQ1xUA@mail.gmail.com> <CAAp0bGvhhWcLO76UQ+nXZuhazjJr9wsjwBkuCX78O4K=em9wuQ@mail.gmail.com> <5474C889.5090503@mrabarnett.plus.com> <CAAp0bGtv13QaPhfTx+tzSe6ZpQ9RCLiWrG1Cv+qfEw3JZ41o9g@mail.gmail.com> <547545CF.60208@gmail.com> <CAAp0bGuMRmEXXFpHaVx0MBoQ72N3MYXYwnnxpS58w-LSV6vTdw@mail.gmail.com> <5476A134.7050407@gmail.com> <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>
In-Reply-To <CAAp0bGvypnRutp5MmRV6sOu2iU267TbB-yeyteUN9kH6twVKKw@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16387.1417136088.18130.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1417136088 news.xs4all.nl 2905 [2001:888:2000:d::a6]:44309
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81656

Show key headers only | 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