1.1 --- a/pprocess.py Fri Jul 17 00:48:26 2009 +0200
1.2 +++ b/pprocess.py Sun Jan 05 00:56:23 2014 +0100
1.3 @@ -4,7 +4,8 @@
1.4 A simple parallel processing API for Python, inspired somewhat by the thread
1.5 module, slightly less by pypar, and slightly less still by pypvm.
1.6
1.7 -Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Paul Boddie <paul@boddie.org.uk>
1.9 +Copyright (C) 2013 Yaroslav Halchenko <debian@onerussian.com>
1.10
1.11 This program is free software; you can redistribute it and/or modify it under
1.12 the terms of the GNU Lesser General Public License as published by the Free
1.13 @@ -20,7 +21,7 @@
1.14 with this program. If not, see <http://www.gnu.org/licenses/>.
1.15 """
1.16
1.17 -__version__ = "0.5"
1.18 +__version__ = "0.5.1"
1.19
1.20 import os
1.21 import sys
1.22 @@ -28,6 +29,8 @@
1.23 import socket
1.24 import platform
1.25
1.26 +from warnings import warn
1.27 +
1.28 try:
1.29 import cPickle as pickle
1.30 except ImportError:
1.31 @@ -396,8 +399,12 @@
1.32
1.33 if self.active():
1.34 for channel in self.ready(timeout):
1.35 - self.store_data(channel)
1.36 - self.start_waiting(channel)
1.37 + try:
1.38 + self.store_data(channel)
1.39 + self.start_waiting(channel)
1.40 + except IOError, exc:
1.41 + self.remove(channel)
1.42 + warn("Removed channel %r due to IOError: %s" % (channel, exc))
1.43
1.44 # Or schedule new processes and channels.
1.45