is there a decent way to differenciate a promise-chan from another type of chan? I think I can just tap into internals (look at channel.buf) but I am not sure that's something I'd like to do
Why do you need that?
I am in a case where I can optimize the consumer side depending if it's a single value or N
and I know for certain single value will always from from a promise-chan
As I understand it, you pass a promise-chan only when the consumer already expects to consume just once. May I ask what’s your case in more detail?
no not really. Think setting up http content-length early (upon sending headers) for single shot response vs chunked header for N messages). I could set chunked for all and be done with it. but it is problematic to do that for a few reasons and I'd rather avoid it.
sending headers and writing the actual body of the response are done separately (working with vertx http client in that case)
I think I might just make this stuff explicit I think instead of relying on shape of input