# HG changeset patch # User paulb # Date 1163895006 0 # Node ID 96c2b5ec134c80824ea52bd98b13d79b6cc01b11 # Parent dbfc34b8ad7817be7c4a4fbeab3258ea0d480383 [project @ 2006-11-19 00:10:06 by paulb] Made the Exchange handle simultaneous read and closed conditions on channels, providing closed channels to callers where autoclose has not been enabled. Updated release information. diff -r dbfc34b8ad78 -r 96c2b5ec134c PKG-INFO --- a/PKG-INFO Thu Jun 19 21:43:05 2008 +0200 +++ b/PKG-INFO Sun Nov 19 00:10:06 2006 +0000 @@ -1,11 +1,11 @@ Metadata-Version: 1.1 Name: parallel -Version: 0.2.1 +Version: 0.2.2 Author: Paul Boddie Author-email: paul at boddie org uk Maintainer: Paul Boddie Maintainer-email: paul at boddie org uk -Download-url: http://www.boddie.org.uk/python/downloads/parallel-0.2.1.tar.gz +Download-url: http://www.boddie.org.uk/python/downloads/parallel-0.2.2.tar.gz Summary: Elementary parallel programming for Python License: LGPL Description: The pprocess module provides elementary support for parallel diff -r dbfc34b8ad78 -r 96c2b5ec134c README.txt --- a/README.txt Thu Jun 19 21:43:05 2008 +0200 +++ b/README.txt Sun Nov 19 00:10:06 2006 +0000 @@ -51,6 +51,15 @@ This software depends on standard library features which are stated as being available only on "UNIX"; it has only been tested on a GNU/Linux system. +New in parallel 0.2.2 (Changes since parallel 0.2.1) +---------------------------------------------------- + + * Changed the status testing in the Exchange class, potentially fixing the + premature closure of channels before all data was read. + * Fixed the PyGmy raytracer example's process accounting by relying on the + possibly more reliable Exchange behaviour, whilst also preventing + erroneous creation of "out of bounds" processes. + New in parallel 0.2.1 (Changes since parallel 0.2) -------------------------------------------------- diff -r dbfc34b8ad78 -r 96c2b5ec134c pprocess.py --- a/pprocess.py Thu Jun 19 21:43:05 2008 +0200 +++ b/pprocess.py Sun Nov 19 00:10:06 2006 +0000 @@ -122,7 +122,7 @@ sockets are more predictable than pipes. """ -__version__ = "0.2.1" +__version__ = "0.2.2" import os import sys @@ -273,16 +273,19 @@ readables = [] for fd, status in fds: channel = self.readables[fd] + removed = 0 # Remove ended/error channels. if status & (select.POLLHUP | select.POLLNVAL | select.POLLERR): self.remove(channel) + removed = 1 # Record readable channels. - elif status & select.POLLIN: - readables.append(channel) + if status & select.POLLIN: + if not (removed and self.autoclose): + readables.append(channel) return readables