-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
I'm seeing hangs using OrderedWorker if the payload used in put is longer than a certain size. Here is an example that will randomly hang on my machine if a single character is added to the payload:
from __future__ import print_function
import random
import mpipe
class OWorker(mpipe.OrderedWorker):
def doTask(self, value):
return value
if __name__ == '__main__':
stage_get = mpipe.Stage(OWorker, 2)
p = mpipe.Pipeline(stage_get)
j=95
if random.randint(0,1):
print("HANGS")
j += 1
else:
print("WORKS")
for i in list(range(10)):
d = {'payload': 'a'*j}
p.put(d)
p.put(None)
for r in p.results():
print(r)
Tested hanging behavior on OS X using Python 2.7.11 and 3.5.1. Latest version of mpipe installed via pip install mpipe.