Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Bi-directional sub-process communication Date: Mon, 23 Nov 2015 19:05:45 -0500 Organization: IISS Elusive Unicorn Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de INM70AY1tcy17lUXafuiVAsUjgCYTEETMNN+ztPC2YrA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'receives': 0.03; 'subject:skip:c 10': 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; 'subject:process': 0.09; 'threads,': 0.09; 'command;': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'slave': 0.16; 'subject:sub': 0.16; 'threads': 0.16; 'url:home': 0.18; '2015': 0.20; 'seems': 0.23; 'mon,': 0.24; 'requests': 0.25; 'header:X-Complaints-To:1': 0.26; 'locks': 0.29; 'queue': 0.29; 'class': 0.33; 'nov': 0.35; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us- ascii': 0.37; 'speak': 0.38; 'means': 0.39; 'enough': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'side': 0.62; 'information': 0.63; 'reply': 0.68; 'packet.': 0.84; 'shared,': 0.84; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-219-161.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: , Xref: csiph.com comp.lang.python:99288 On Mon, 23 Nov 2015 08:54:38 -0900, Israel Brewster declaimed the following: >Concern: Since the master process is multi-threaded, it seems likely enough that multiple threads on the master side would make requests at the same time. I understand that the Queue class has locks that make Multiple "master" threads, to me, means you do NOT have a "master process". Let there be a Queue for EVERY LISTENER. Send the Queue as part of the request packet. Let the subthread reply to the queue that was provided via the packet Voila! No intermixing of "master/slave" interaction; each slave only replies to the master that sent it a command; each master only receives replies from slaves it has commanded. Slaves can still be shared, as they are given the information of which master they need to speak with. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/