swactor/src/lib.rs
Zachery Aaron Shores-Chmielewski 2f91c7d1bd feat(WIP): runtime/router refactor
Simplify the implementation of the multithreaded runtime and router.
2026-01-25 11:45:34 +07:00

28 lines
614 B
Rust

pub mod actor;
pub(crate) mod error;
pub use error::Error;
mod ring_buffer;
mod router;
pub mod runtime;
// Re-export commonly used types
pub use actor::{ActorAddress, ActorInterface, Message};
pub use runtime::{Inbox, Runtime, RuntimeFlavor};
#[cfg(feature = "getrandom")]
pub(crate) fn get_random(buf: &mut [u8]) {
getrandom::getrandom(buf).unwrap()
}
/// The strategy for message processing is such:
///
/// ```ignore
/// if total_messages < WATERLEVEL:
/// process all
/// else
/// process total_messages >> 1
/// ```
const WATERLEVEL: usize = 10;
const DEFAULT_INBOX_CAPACITY: usize = 1_000;