once-array 0.1.0

Append-only single-writer fixed-capacity vector that can be shared across threads and accessed as a slice
Documentation
  • Coverage
  • 100%
    19 out of 19 items documented1 out of 19 items with examples
  • Size
  • Source code size: 32.44 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kevinmehall/once-array
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kevinmehall

OnceArray

Documentation | Release Notes

A single-producer multiple-consumer append-only fixed capacity array in Rust.

Creating a OnceArrayWriter<T> allocates a fixed-capacity buffer and represents exclusive access to append elements. Any number of Arc<OnceArray<T>> references can be created and shared across threads. These readers can access the slice of committed elements, and see new elements as they are committed by the writer without any locking.

OnceArray serves as a building block for streaming data to multiple consumers while amortizing the cost of allocation and synchronization across chunks of many elements.

License

MIT or Apache 2.0 at your option