Skip to content

Commit

Permalink
docs: minor documentation fixes (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw authored Mar 16, 2022
1 parent d864827 commit 8d34b1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "thingbuf"
version = "0.1.0"
edition = "2021"
rust-version = "1.57.0"
author = "Eliza Weisman <[email protected]>"
authors = ["Eliza Weisman <[email protected]>"]
license = "MIT"
repository = "https://github.com/hawkw/thingbuf"
homepage = "https://github.com/hawkw/thingbuf"
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the ring buffer.
MPSC channel in most use cases.

Both [asynchronous][`thingbuf::mpsc`] and [blocking][`thingbuf::mpsc::sync`]
MPSC channels are available[^blocking-std], so `thingbuf` can be used in place
MPSC channels are available, so `thingbuf` can be used in place
of asynchronous channels like [`futures::channel::mpsc`] *and* blocking
channels like [`std::sync::mpsc::sync_channel`].

Expand Down Expand Up @@ -149,16 +149,17 @@ thingbuf = { version = "0.1", default-features = false, features = ["alloc"] }

### Crate Feature Flags

- **std**: Enables features that require the Rust standard library, such as
- **std** (_Enabled by default_): Enables features that require the Rust
standard library, such as
synchronous (blocking) channels. This implicitly enables the "alloc" feature
flag. _Enabled by default_.
flag.
- **alloc**: Enables features that require `liballoc` (but not `libstd`). This
enables `thingbuf` queues and asynchronous channels where the size of the
channel is determined at runtime.
- **static**: Enables the static (const-generic-based) `thingbuf` queues and
channels. These can be used without dynamic memory allocation when the size of
a queue or channel is known at compile-time. _Disabled by default (requires
Rust 1.60 or newer)_.
- **static** (_Disabled by default, requires Rust 1.59+_): Enables the static
(const-generic-based) `thingbuf` queues and channels. These can be used
without dynamic memory allocation when the size of a queue or channel is known
at compile-time.

### Compiler Support

Expand All @@ -184,10 +185,6 @@ feature flag requries Rust 1.60+.

**A:** Extremely.

- **Q: Is it wait-free?**

**A:** As long as you don't use the APIs that wait :)

- **Q: Why is there only a bounded variant?**

**A:** Because unbounded queues are of the Devil.
Expand All @@ -211,7 +208,4 @@ feature flag requries Rust 1.60+.
[`std::sync::mpsc::sync_channel`]: https://doc.rust-lang.org/stable/std/sync/mpsc/fn.sync_channel.html
[`tokio::sync::mpsc`]: https://docs.rs/tokio/latest/tokio/sync/mpsc/index.html
[`tracing`]: https://crates.io/crates/tracing
[`crossbeam-channel`]: https://crates.io/crates/crossbeam-channel

[^blocking-std]: The synchronous (blocking) channel naturally requires `std` in
order to park threads.
[`crossbeam-channel`]: https://crates.io/crates/crossbeam-channel

0 comments on commit 8d34b1c

Please sign in to comment.