Don't pass multiprocess object on pickle (#261)
This commit is contained in:
@@ -48,6 +48,11 @@ class SubprocessGenerator(object):
|
|||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def __getstate__(self):
|
||||||
|
self_dict = self.__dict__.copy()
|
||||||
|
del self_dict['p']
|
||||||
|
return self_dict
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
if self.p == None:
|
if self.p == None:
|
||||||
user_param = self.user_param
|
user_param = self.user_param
|
||||||
|
|||||||
Reference in New Issue
Block a user