From 24861ba313650dc87a88208bf38540c3e67fc894 Mon Sep 17 00:00:00 2001 From: Bene <37740907+Nereuxofficial@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:23:55 +0100 Subject: [PATCH] Reworded a sentence --- src/06_multiple_futures/04_spawning.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/06_multiple_futures/04_spawning.md b/src/06_multiple_futures/04_spawning.md index 14f4d6e..c2afb01 100644 --- a/src/06_multiple_futures/04_spawning.md +++ b/src/06_multiple_futures/04_spawning.md @@ -3,10 +3,10 @@ Spawning allows you to run a new asynchronous task in the background. This allows us to continue executing other code while it is running. -Say we have a webserver that wants to accept connections without blocking the main thread. -We can do this by using the `async_std::task::spawn` function to spawn a new task that runs -the connection handler. This function takes a future and returns a `JoinHandle` that can be -used to await the result of the spawned task. +Say we have a web server that wants to accept connections without blocking the main thread. +To achieve this, we can use the async_std::task::spawn function to create and run a new task that handles the +connections. This function takes a future and returns a JoinHandle, which can be used to wait for the result of the +task once it's completed. ```rust,edition2018 {{#include ../../examples/06_04_spawning/src/lib.rs:example}}