Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5647
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.038 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'wed,': 0.04; 'subject:search': 0.07; 'nicely': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'generators.': 0.16; 'sequence,': 0.16; "hasn't": 0.19; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'wonder': 0.24; "i'm": 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'pattern': 0.31; 'queue': 0.31; 'threads': 0.31; 'separate': 0.31; 'all,': 0.31; 'to:addr:python-list': 0.32; 'actually': 0.34; 'couple': 0.35; 'succeeded': 0.35; 'processing': 0.37; 'two': 0.37; 'received:209.85': 0.37; 'element': 0.38; 'sequence': 0.38; 'received:google.com': 0.38; 'them,': 0.38; 'signal': 0.39; 'provider': 0.39; 'to:addr:python.org': 0.39; 'where': 0.39; 'received:209': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'might': 0.40; '2011': 0.62; 'consumer': 0.80; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=EEra5enlSYxSjuolETnH7qcMecfQ7N63LypXFrfSFvY=; b=KeKHJSRGkZiR6vt30LjRyeWgziejrSYISqTfWK4ONfd87X5sIXZS4YPhakNL53weWe CFN0V+kUy1Jrl5MIQ3e6OWQhrZtSchutwPdnyLiTqIU9qF4BNwVD2hF2nyZRn4b4eF7M YfKUKZwEm0vCmasFc8JDiN4TULuPcJwLbgPzc= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=S08LmVTLvqRX39bGIFCMDH6a4b26dACvY8EkRmdfgm2dJEgdM4xv1iFBBoJtWIk1JT sWGcsfuUiAjDIHt5n6fRI9B9tsPRU3XR+mr6BGa6cyIyuxneN2SDsAa3Tb9Bh2gvzu/9 7UQNK8bcfghHN+q07yAPLIT9GdSxv+5ljCnFY= |
| MIME-Version | 1.0 |
| In-Reply-To | <4DD2AA99.3010508@simplistix.co.uk> |
| References | <4DD2AA99.3010508@simplistix.co.uk> |
| Date | Wed, 18 May 2011 12:50:09 +1000 |
| Subject | Re: in search of graceful co-routines |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1739.1305687011.9059.python-list@python.org> (permalink) |
| Lines | 15 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1305687011 news.xs4all.nl 49178 [::ffff:82.94.164.166]:44390 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:5647 |
Show key headers only | View raw
On Wed, May 18, 2011 at 3:04 AM, Chris Withers <chris@simplistix.co.uk> wrote: > Hi All, > > I'm looking for a graceful pattern for the situation where I have a provider > of a sequence, the consumer of a sequence and code to moderate the two, and > where I'd like to consumer to be able to signal to the provider that it > hasn't succeeded in processing one element in the queue. I wonder would this work nicely if concepted as a couple of threads with a Queue between them? Whether or not you actually use threads per se, or if you just have two separate processing loops and message passing between them, it might be easier to code that way than as generators. Chris Angelico
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: in search of graceful co-routines Chris Angelico <rosuav@gmail.com> - 2011-05-18 12:50 +1000
csiph-web