Yes this work. osaka is a proc_macro transforming rust into a dialect that has continuations.
-
-
Show this thread
-
The fn returns an AsyncStream itself and acts like a filter. You can call it from another async function using <-
Show this thread -
continue is actually translated to Async::Again which can contain a continuation token for integration into an eventloop like mio. So e.g. a tcpsocket does 'continue self.pollfd;' to indicate the continuation shall be continued when pollfd is ready
Show this thread -
This makes both push and pull based models work without allocation or dynamic dispatch. All that osaka does is build a continuation stack that can be progressed with or without parameters.
Show this thread -
Continuations are closures, so unlike async/await you can actually put mutable state everywhere, making it significantly easier to manage than passing state through futures.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.