Richard Oudkerk <[email protected]> added the comment:
As long as you don't pass the arguments on to Process.__init__() when you call
it there should be no problem.
The following program works, but will fail with RuntimeError if you uncomment
the comment line:
from multiprocessing import Process
class Unpicklable(object):
def __reduce__(self):
raise RuntimeError
class MyProcess(Process):
def __init__(self, foo, unpicklable_bar):
Process.__init__(self,
#args=(foo, unpicklable_bar)
)
self.foo = foo
self.baz = str(unpicklable_bar)
def run(self):
print(self.foo)
print(self.baz)
if __name__ == '__main__':
p = MyProcess([1,2,3], Unpicklable())
p.start()
p.join()
----------
nosy: +sbt
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8289>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com