Skip to content

Commit

Permalink
Refer to Poll::Pending in ReadMe. (#45)
Browse files Browse the repository at this point in the history
* Refer to `Poll::Pending` in ReadMe.

* Remove parentheses.
  • Loading branch information
reitermarkus authored Jan 16, 2024
1 parent 2fe7f68 commit a956404
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with the `async` / `await` model.

The [`WouldBlock`](enum.Error.html) error variant signals that the operation
can't be completed *right now* and would need to block to complete.
[`WouldBlock`](enum.Error.html) is a special error in the sense that's not
[`WouldBlock`](enum.Error.html) is a special error in the sense that it's not
*fatal*; the operation can still be completed by retrying again later.

[`nb::Result`](type.Result.html) is based on the API of
Expand All @@ -32,12 +32,10 @@ which has a `WouldBlock` variant in its
We can map [`WouldBlock`](enum.Error.html) to different blocking and
non-blocking models:

- In blocking mode: [`WouldBlock`](enum.Error.html) means try again right
now (i.e. busy wait)
- In `futures` mode: [`WouldBlock`](enum.Error.html) means
[`Async::NotReady`](https://docs.rs/futures)
- In `await` mode: [`WouldBlock`](enum.Error.html) means `yield`
(suspend the generator)
- In blocking mode, [`WouldBlock`](enum.Error.html) means try again right
now, i.e. busy waiting.
- In `async` mode, [`WouldBlock`](enum.Error.html) means
[`Poll::Pending`](https://doc.rust-lang.org/core/task/enum.Poll.html#variant.Pending).


## Minimum Supported Rust Version (MSRV)
Expand Down

0 comments on commit a956404

Please sign in to comment.