Don't mention async-task

integrate-threads-example
Florian Gilcher 5 years ago
parent 6c7922a404
commit 95a2f8ed38
No known key found for this signature in database
GPG Key ID: E7B51D33F8EBF61B

@ -8,7 +8,7 @@ These concepts are not hard, but something many people are not used to. This bas
Futures are a concept that abstracts over how code is run. By themselves, they do nothing. This is a weird concept in an imperative language, where usually one thing happens after the other - right now. Futures are a concept that abstracts over how code is run. By themselves, they do nothing. This is a weird concept in an imperative language, where usually one thing happens after the other - right now.
So how do Futures run? You decide! Futures do nothing without the piece of code _executing_ them. This part is called an _executor_. An _executor_ decides _when_ and _how_ to execute your futures. `async-task` is such an _executor_, `async-std` is a library providing the building blocks. So how do Futures run? You decide! Futures do nothing without the piece of code _executing_ them. This part is called an _executor_. An _executor_ decides _when_ and _how_ to execute your futures. The `async-std::task` module provides you with and interface to such an executor.
Let's start with a little bit of motivation, though. Let's start with a little bit of motivation, though.

@ -2,12 +2,9 @@
![async-std logo](./images/horizontal_color.svg) ![async-std logo](./images/horizontal_color.svg)
`async-std` and `async-task` along with their [supporting libraries][organization] are a two libraries making your life in async programming easier. They provide fundamental implementations for downstream libraries and applications alike. `async-std` along with its [supporting libraries][organization] is a library making your life in async programming easier. It provides provide fundamental implementations for downstream libraries and applications alike. The name reflects the approach of this library: it is a closely modeled to the Rust main standard library as possible, replacing all components by async counterparts.
`async-std` provides an interface to all important primitives: filesystem operations, network operations and concurrency basics like timers. It also exposes `async-task` in a model similar to the `thread` module found in the Rust standard lib. The name reflects the approach of this library: it is a closely modeled to the Rust main standard library as possible, replacing all components by async counterparts. This not only includes io primitives, but also `async/await` compatible versions of primitives like `Mutex`. You can read more about `async-std` in [the overview chapter][overview-std]. `async-std` provides an interface to all important primitives: filesystem operations, network operations and concurrency basics like timers. It also exposes an `task` in a model similar to the `thread` module found in the Rust standard lib. But it does not only include io primitives, but also `async/await` compatible versions of primitives like `Mutex`. You can read more about `async-std` in [the overview chapter][overview-std].
`async-task` is a library for implementing asynchronous tasks quickly. For the purpose of this documentation, you will mainly interact with it through the `async_std::task` module. Still, it has some nice properties to be aware of, which you can read up on in the [`async-task` crate docs][task-docs].
[organization]: https://github.com/async-std/async-std [organization]: https://github.com/async-std/async-std
[overview-std]: overview/async-std/ [overview-std]: overview/async-std/
[overview-task]: https://docs.rs/async-task

@ -1,6 +1,6 @@
# Stability and SemVer # Stability and SemVer
`async-std` and `async-task` follow https://semver.org/. `async-std` follows https://semver.org/.
In short: we are versioning our software as `MAJOR.MINOR.PATCH`. We increase the: In short: we are versioning our software as `MAJOR.MINOR.PATCH`. We increase the:

@ -1,7 +1,7 @@
# Exercise: Waiting for `std::thread` # Exercise: Waiting for `std::thread`
Parallel processing is usually done via [threads]. Parallel processing is usually done via [threads].
Concurrent programming is usually done with systems similar to [async-task]. In `async-std`, we have similar concept, called a [`task`].
These two worlds seem different - and in some regards, they are - though they These two worlds seem different - and in some regards, they are - though they
are easy to connect. are easy to connect.
In this exercise, you will learn how to connect to concurrent/parallel components easily, by connecting a thread to a task. In this exercise, you will learn how to connect to concurrent/parallel components easily, by connecting a thread to a task.
@ -36,8 +36,8 @@ This comes at a cost though: the waiting thread will [block] until the child is
[threads]: TODO: wikipedia [threads]: TODO: wikipedia
[async-task]: TODO: link [`task`]: TODO: docs link
[`spawn`]: TODO: link [`spawn`]: TODO: docs link
[`JoinHandle`]: TODO: link [`JoinHandle`]: TODO: docs link
[schedules]: TODO: Glossary link [schedules]: TODO: Glossary link
[block]: TODO: Link to blocking [block]: TODO: Link to blocking
Loading…
Cancel
Save