As you know by now, you need to bring your own runtime for driving and scheduling asynchronous tasks in Rust. Runtimes come in many flavors, from the popular Embassy embedded […]
Read MoreIMPORTANT – Coroutines and async/await
There is one subtle point to make a note of here. The first time JoinAll::poll is called, it will call poll on each future in the collection. Polling each future […]
Read Morec-async-await-concurrent futures – Coroutines and async/await
Okay, so we’ll build on the last example and do just the same thing. Create a new project called c-async-await and copy Cargo.toml and everything in the src folder over. […]
Read MoreNOTE – Coroutines and async/await
For convenience, there is a file called original_main.rs in the root of the project that contains the code for main.rs that we presented, so you don’t need to save the […]
Read Moreb-async-await—an example of a coroutine/wait transformation – Coroutines and async/await
Let’s start by expanding our example slightly. Now that we have a program that writes out our state machines, it’s easier for us to create some examples and cover some […]
Read Morecoroutine/wait – Coroutines and async/await
The coroutine/wait syntax will have clear similarities to the async/await syntax, although it’s a lot more limited. The basic rules are as follows: Our implementation will make sure that if […]
Read More