If a capability accepts a callback as a method param, such as for subscriptions, then it seems there are (at least) two possible ways to handle cancellation:
a) return a handle that can be dropped to cancel the subscription interface Foo { subscribe (callback :Callback) -> (handle :Capability); } or b) fulfil the promise returned by the method call at EOF, and drop the promise to cancel the subscription. interface Foo { subscribe (callback :Callback); } I'm curious to understand fully the pros and cons of each approach, especially when the callback is a ByteStream, where it seems natural to return the pumpTo promise as the result of the subscribe call's implementation? Cheers, Vaci -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/790ea1e0-65e6-44e1-a97a-93e943dd8b34n%40googlegroups.com.