# HG changeset patch # User paulb # Date 1163964971 0 # Node ID ad59f21ee06ec070cfad7c1af21f0b129d7ee395 # Parent 9878207c91b729e29c6200de9f187aae5cf4c0ff [project @ 2006-11-19 19:36:11 by paulb] Added removed attribute on Exchange. Updated release notes. diff -r 9878207c91b7 -r ad59f21ee06e README.txt --- a/README.txt Sun Nov 19 00:10:28 2006 +0000 +++ b/README.txt Sun Nov 19 19:36:11 2006 +0000 @@ -59,6 +59,8 @@ * 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. + * Added a removed attribute on the Exchange to record which channels were + removed in the last call to the ready method. New in parallel 0.2.1 (Changes since parallel 0.2) -------------------------------------------------- diff -r 9878207c91b7 -r ad59f21ee06e pprocess.py --- a/pprocess.py Sun Nov 19 00:10:28 2006 +0000 +++ b/pprocess.py Sun Nov 19 19:36:11 2006 +0000 @@ -4,7 +4,7 @@ A simple parallel processing API for Python, inspired somewhat by the thread module, slightly less by pypar, and slightly less still by pypvm. -Copyright (C) 2005 Paul Boddie +Copyright (C) 2005, 2006 Paul Boddie This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -120,6 +120,10 @@ It would seem, from using sockets and from studying the asyncore module, that sockets are more predictable than pipes. + +Notes about poll implementations can be found here: + +http://www.greenend.org.uk/rjk/2001/06/poll.html """ __version__ = "0.2.2" @@ -244,6 +248,7 @@ self.autoclose = autoclose self.readables = {} + self.removed = [] self.poller = select.poll() for channel in channels or []: self.add(channel) @@ -271,6 +276,8 @@ fds = self.poller.poll(timeout) readables = [] + self.removed = [] + for fd, status in fds: channel = self.readables[fd] removed = 0 @@ -279,6 +286,7 @@ if status & (select.POLLHUP | select.POLLNVAL | select.POLLERR): self.remove(channel) + self.removed.append(channel) removed = 1 # Record readable channels.