You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/concepts/futures.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,7 @@ To sum up: Rust gives us the ability to safely abstract over important propertie
24
24
25
25
## An easy view of computation
26
26
27
-
While computation is a subject to write a whole [book](https://computationbook.com/) about, a very simplified view suffices for us:
28
-
29
-
- computation is a sequence of composable operations
30
-
- they can branch based on a decision
31
-
- they either run to succession and yield a result, or they can yield an error
27
+
While computation is a subject to write a whole [book](https://computationbook.com/) about, a very simplified view suffices for us: A sequence of composable operations which can branch based on a decision, run to succession and yield a result or yield an error
32
28
33
29
## Deferring computation
34
30
@@ -136,11 +132,11 @@ When executing 2 or more of these functions at the same time, our runtime system
136
132
137
133
## Conclusion
138
134
139
-
Working from values, we searched for something that expresses *working towards a value available sometime later*. From there, we talked about the concept of polling.
135
+
Working from values, we searched for something that expresses *working towards a value available later*. From there, we talked about the concept of polling.
140
136
141
137
A `Future` is any data type that does not represent a value, but the ability to *produce a value at some point in the future*. Implementations of this are very varied and detailed depending on use-case, but the interface is simple.
142
138
143
-
Next, we will introduce you to `tasks`, which we need to actually *run* Futures.
139
+
Next, we will introduce you to `tasks`, which we will use to actually *run* Futures.
144
140
145
141
[^1]: Two parties reading while it is guaranteed that no one is writing is always safe.
Copy file name to clipboardExpand all lines: docs/src/concepts/tasks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ Tasks in `async_std` are one of the core abstractions. Much like Rust's `thread`
80
80
81
81
## Blocking
82
82
83
-
`Task`s are assumed to run _concurrently_, potentially by sharing a thread of execution. This means that operations blocking an _operating system thread_, such as `std::thread::sleep` or io function from Rust's `std` library will _stop execution of all tasks sharing this thread_. Other libraries (such as database drivers) have similar behaviour. Note that _blocking the current thread_ is not in and by itself bad behaviour, just something that does not mix well with the concurrent execution model of `async-std`. Essentially, never do this:
83
+
`Task`s are assumed to run _concurrently_, potentially by sharing a thread of execution. This means that operations blocking an _operating system thread_, such as `std::thread::sleep` or io function from Rust's `std` library will _stop execution of all tasks sharing this thread_. Other libraries (such as database drivers) have similar behaviour. Note that _blocking the current thread_ is not in and of itself bad behaviour, just something that does not mix well with the concurrent execution model of `async-std`. Essentially, never do this:
Copy file name to clipboardExpand all lines: docs/src/overview/async-std.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,4 @@
4
4
5
5
`async-std` provides an interface to all important primitives: filesystem operations, network operations and concurrency basics like timers. It also exposes a `task` in a model similar to the `thread` module found in the Rust standard lib. But it does not only include I/O primitives, but also `async/await` compatible versions of primitives like `Mutex`.
Copy file name to clipboardExpand all lines: docs/src/overview/stability-guarantees.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ In general, this crate will be conservative with respect to the minimum supporte
31
31
32
32
## Security fixes
33
33
34
-
Security fixes will be applied to _all_ minor branches of this library in all _supported_ major revisions. This policy might change in the future, in which case we give at least _3 month_ of ahead notice.
34
+
Security fixes will be applied to _all_ minor branches of this library in all _supported_ major revisions. This policy might change in the future, in which case we give a notice at least _3 months_ahead.
0 commit comments