Does anyone have an example of a piece of code where a Future that returns a Future? Can be JS too: a Promise that returns a Promise. I'm curious when this might be used, rather than just having it be a theoretical example.
-
-
Sometimes you want to return an intermediate result, which you can do by returning a struct or tuple containing the future. The awaits would be split across lines anyway though
-
I think there's a bunch of places nested futures may be more useful for when you're writing futures code without a tokio executor (or perhaps without any executor at all) but I'm not sure
- 1 more reply
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.