Open CJ-Wright opened 5 years ago
combine_latest
would need to make a future which represents the latest actually good future or the current data if good.
def if_good(x, y):
xx = result_maybe(x)
if xx != sentinel:
return xx
else:
return result_maybe(y)
def update(self, x, who=None):
if not self.cache_future:
self.cache_future[who] = x
else:
self.cache_future[who] = submit(if_good, x, self.cache_future[who])
... # emit out the futures if all exist
This might work? It will loose any incoming data that is before all channels get a good data set, but we might do that already?
Parallel filter causes a whole host of problems: