| Crates.io | real-time |
| lib.rs | real-time |
| version | 0.8.0 |
| created_at | 2023-10-22 22:19:55.279263+00 |
| updated_at | 2025-07-19 15:36:05.744959+00 |
| description | Safely share data with a real-time thread. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1010820 |
| size | 80,589 |
Safely share data with a real-time thread.
This crate provides some tools for sharing data with a real-time thread.
real_time::readableA shared value that can be read on a real-time thread.
fn main() {
let (writer, reader) = real_time::readable(SynthParameters::default());
}
real_time::writableA shared value that can be written to from a real-time thread.
fn main() {
let (writer, reader) = real_time::writable(AudioPlaybackStats::default());
}
real_time::fifoA bounded, lock-free, single-producer, single consumer FIFO that is optimised for a real-time consumer. Values sent will be reclaimed and dropped by the producer once the real-time consumer has finished with them.
fn main() {
let (producer, consumer) = real_time::fifo::<MidiMessage, 16>();
}
Add this to your Cargo.toml:
[dependencies]
real-time = "0.8"
real_time::readable and real_time::writable use the same algorithms as RealtimeObject
from FAbian's Realtime Box o' Tricks, that
was presented at Meeting C++ 2019.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.