File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,12 @@ while it is running.
55
66Say we have a web server that wants to accept connections without blocking the main thread.
77To achieve this, we can use the ` async_std::task::spawn ` function to create and run a new task that handles the
8- connections. This function takes a future and returns a JoinHandle, which can be used to wait for the result of the
8+ connections. This function takes a future and returns a ` JoinHandle ` , which can be used to wait for the result of the
99task once it's completed.
1010
1111``` rust,edition2018
1212{{#include ../../examples/06_04_spawning/src/lib.rs:example}}
13- ```
13+ ```
14+
15+ To communicate between the main task and the spawned task, we can use
16+ provided by the used async runtime.
You can’t perform that action at this time.
0 commit comments