Fix memory leak in new streaming (second attempt)
This commit is contained in:
parent
92fe947721
commit
37f0166b2d
2 changed files with 4 additions and 2 deletions
|
@ -49,7 +49,7 @@ class Iteratorize:
|
|||
def __init__(self, func, kwargs={}, callback=None):
|
||||
self.mfunc=func
|
||||
self.c_callback=callback
|
||||
self.q = Queue(maxsize=1)
|
||||
self.q = Queue()
|
||||
self.sentinel = object()
|
||||
self.kwargs = kwargs
|
||||
|
||||
|
@ -73,3 +73,6 @@ class Iteratorize:
|
|||
raise StopIteration
|
||||
else:
|
||||
return obj
|
||||
|
||||
def __del__(self):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue