Ardan-1HourAsync icon indicating copy to clipboard operation
Ardan-1HourAsync copied to clipboard

Code accompanying the 1 Hour Dive into Async live stream.

1 Hour Async

This is the code accompanying the 1 Hour Dive into Async live-stream.

  • The slides are here
  • You can watch the recorded event on YouTube

Included Projects

  1. Block On with Futures. Using block_on to start an async runtime.
  2. Block On with Tokio. Using block_on with options to start a Tokio runtime.
  3. Hello Tokio. Start a runtime and await your first function.
  4. Tokio Joining. Using join to run multiple tasks concurrently. Switch between single-threaded and multi-threaded execution to see the difference in output.
  5. Tokio Spawn. Spawn tasks in the background, either detached or for access later.
  6. Tokio Yield. Yield control from an async task, to ensure another one can run.
  7. Tokio Select. Select the first of several futures to return.
  8. Tokio Blocking. The right way and the wrong way to perform a blocking function in Tokio.
  9. Tokio Spawn Blocking. Spawn a blocking function in the background without tying up the Tokio runtime.
  10. Tokio MPSC Channels. Create an async channel between tasks.
  11. Tokio Multiple Channels. Create several channels and select the first one to return.
  12. Thread to Tokio. Send messages from a thread and into an async process.
  13. Tokio Stream Generators. You can use streams as generators.
  14. Tokio File IO as a Stream. Stream files to pace IO, even in a single-threaded runtime.
  15. Tracing: logging. Setup trace-based logging.
  16. Tracing: structures. Log to JSON instead.
  17. Adapting Streams. Adapt a stream in-flight and learn about pinning.