Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; 'thread': 0.14; 'dexter': 0.16; 'magic': 0.16; 'subject:Problems': 0.16; 'subject:threads': 0.16; 'ths': 0.16; 'tkinter.': 0.16; 'wrote:': 0.18; 'passing': 0.19; 'thu,': 0.19; 'seems': 0.21; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'processor': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'leave': 0.29; "doesn't": 0.30; 'work.': 0.31; 'file': 0.32; 'probably': 0.32; 'stuff': 0.32; 'checking': 0.33; 'subject:with': 0.35; 'problem.': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'doing': 0.36; 'charset:us- ascii': 0.36; 'e.g.': 0.38; 'expect': 0.39; 'launch': 0.39; "you're": 0.61; 'advanced': 0.63; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'within': 0.65; 'listening': 0.74; '2013,': 0.91 Date: Thu, 11 Apr 2013 08:03:12 -0500 (CDT) From: Wayne Werner X-X-Sender: wayne@gilgamesh To: Dexter Deejay Subject: Re: Problems with sockets and threads In-Reply-To: References: <347b9197-b409-4651-8c01-26af4c3461ca@googlegroups.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365685395 news.xs4all.nl 2662 [2001:888:2000:d::a6]:36221 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43363 On Thu, 11 Apr 2013, Dexter Deejay wrote: > Yeah, that seems to be problem. Waiting for message is in theory infinite. But why doesn't this separate thread leave processor while it is sleeping? As far as I've been able to tell? Magic ;) But I haven't really dug into it. If you're really doing some waiting stuff you might want to look into some other type of message passing mechanism, e.g. launch a subprocess to do ths listening and then writing to a file and checking that from within Tkinter. I expect there are other possibilities that more advanced people may be able to recommend and are probably better. But that seems like it would work. HTH, -W