2 ms·
Timeouts are covered here. http://alexcrichton.com/futures-rs/futures/index.html#examples http://alexcrichton.com/futures-rs/futures/index.html#exampl... As fo
by pcwalton 10y ago
Timeouts are covered here. http://alexcrichton.com/futures-rs/futures/index.html#examples http://alexcrichton.com/futures-rs/futures/index.html#exampl...
As for repeating something multiple times, you would either repeat the chain 10 times or write your own future combinator. Probably writing a custom future combinator would make the most sense here; actually, such a thing ought to be built-in to futures.rs.
- Animats 10y agoThat's the problem - having to roll your own control structures. IF, WHILE, and FOR cover just about everything. This semi-functional style doesn't break down into a small number of simple, well-known primitives.