Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'handler': 0.04; 'method,': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subsequent': 0.15; 'thu,': 0.15; '"is': 0.16; 'data...': 0.16; 'echo': 0.16; 'handler)': 0.16; 'pairs,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:threads': 0.16; 'subscripting': 0.16; 'attribute': 0.18; 'url:home': 0.18; '2015': 0.20; 'object.': 0.22; 'sep': 0.22; 'testing': 0.25; 'header:X-Complaints-To:1': 0.26; '+0000': 0.27; 'object,': 0.27; "i'm": 0.30; "i'd": 0.31; 'probably': 0.31; 'especially': 0.32; 'point,': 0.33; 'running': 0.34; 'list': 0.34; 'could': 0.35; 'configured': 0.35; 'remote': 0.35; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'being': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'why': 0.39; 'data': 0.39; 'to:addr:python.org': 0.40; 'save': 0.60; 'devices': 0.61; '(utc),': 0.84; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: pyserial and threads Date: Thu, 17 Sep 2015 09:04:51 -0400 Organization: IISS Elusive Unicorn References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-68-178-61.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442495096 news.xs4all.nl 23732 [2001:888:2000:d::a6]:55449 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96766 On Thu, 17 Sep 2015 12:00:08 +0000 (UTC), alister declaimed the following: >I can see the data being transmitted snowballing & running away in a +ve >feedback loop very easily. Especially if a few of the remote devices are configured to ECHO data... Main thing I'd probably change is... Since the COM port identification is already being provided during initialization of the handler object, why maintain a list of (com, handler) pairs, and the subsequent subscripting -- just save the com port as an attribute of the object. One could also make a copy of the object list in the start method, and at that point, scan the list and remove that one's own identity. That would remove the need for always testing "is the object I'm about to send to really me?" -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/