I thought the point of the continuations and NIO code was that I didn't need to use the same thread for the whole request/response cycle. I am only intending to use the stream from a single thread at a time. Specifically, I am creating a continuation in the handler thread, returning from the handler, and then periodically writing to the channel (which I stored in a data structure) in a separate thread as data becomes available. There should only be one thread writing to the channel at a time.
Is there a better way of handling this scenario that would allow me to avoid blocking a thread while I am waiting for data? I have a potentially large number of incomplete responses at any given time, so I don't want to dedicate a thread per request.