As I'm adding functionality to my app, I'm starting to get mired in nested continuations. Is it possible to enter the first continuation, then write a set of synchronous code, then finish the continuation to respond to the client?
Obviously that's true, but I'm not quite sure how to make some of the calls. Take this method, for example <
https://github.com/JetForMe/hoa/blob/master/src/main/java/com/latencyzero/hoa/AbstractHOASession.java#L37>. It calls mUsers.create(), which takes a continuation that eventually calls user.get(), with yet another continuation. Once I'm in the first continuation, I'm on another thread, right? I can just do the rest of the work synchronously?
I thought I read something that calls can be made continuation-style, or synchronously by treating them as if they return a result, but I can't get my naive attempt to work. Can that method be simplified?
Thanks.
--
Rick Mann
rm...@latencyzero.com