If we run just telnet in two separate terminals we'll notice our server will only respond to the first connection, and won't start responding to the second connection until the first quits. Although we've been using a lot of async APIs our current implementation behaves no differently...
I'm in the early stages of soliciting feedback for this article so I can improve it and fix any techincal inaccuracies, confusing examples, or unclear explanations. After a few revisions I'll share it in the usual places like reddit, twitter, and hackernews and post the links h...
Click to share on Reddit (Opens in new window) Click to share on LinkedIn (Opens in new window) Click to share on Facebook (Opens in new window) #rust Would you be interested in joining LogRocket's developer community? Yea No Thanks Stop...
If you need more help or would like to compare solutions, you can ask in #rust-beginners on irc.mozilla.org, the user forum, or the subreddit. If an exercise could be improved in any way, please create an issue or submit a pull request! Variable bindings Relevant chapter in The Rust...
If you need more help or would like to compare solutions, you can ask in #rust-beginners on irc.mozilla.org, the user forum, or the subreddit. If an exercise could be improved in any way, please create an issue or submit a pull request! Variable bindings Relevant chapter in The Rust...
On the other hand, this may not be so great if the future we're cancelling is in the middle of an important operation that if not completed may drop important data or may leave data in a corrupt state.Let's look at an example of "cancelling" a future. Cancelling is in qu...
In this simple toy example we don't care if the count completes or not so this future is cancel-safe in that sense, but if finishing the count was critical to our application then cancelling this future would be a problem. To make sure the future completes we can await it a...
If we run just telnet in two separate terminals we'll notice our server will only respond to the first connection, and won't start responding to the second connection until the first quits. Although we've been using a lot of async APIs our current implementation behaves no differen...
On the other hand, this may not be so great if the future we're cancelling is in the middle of an important operation that if not completed may drop important data or may leave data in a corrupt state.Let's look at an example of "cancelling" a future. Cancelling is in q...
In this simple toy example we don't care if the count completes or not so this future is cancel-safe in that sense, but if finishing the count was critical to our application then cancelling this future would be a problem. To make sure the future completes we can await it af...