Re: Manifold streams/deferreds raising errors downstream of a sink

2015-08-11 Thread Zach Tellman
Hi Andy, To give you some context on this, `put!` will return true if the thing directly downstream accepts the value (in this case, the stream). The fact that the callback in `consume` fails is between the stream and the callback, and is not propagated all the way back (though the exception w

Re: Manifold streams/deferreds raising errors downstream of a sink

2015-08-09 Thread Atamert Ölçgen
Hi Andy, I would provide a function that wraps put!. It would still return a deferred, but not the result of put!. It would create a deferred, representing the result of the computation and pass it down the stream together with the input. Consumers would set its value once the computation is done.

Manifold streams/deferreds raising errors downstream of a sink

2015-08-09 Thread Andy Chambers
Hey All, I'm trying to build a library that exposes manifold streams for data producing applications. The intention would be for these apps to s/put! to a sink stream returned by the producer function. However, I need to take the value that is put in and pipe it into some other function before I