#[cfg(not(reifydb_single_threaded))]
pub mod native;
#[cfg(reifydb_single_threaded)]
pub mod wasm;
#[cfg(not(reifydb_single_threaded))]
pub use native::{ActorHandle, ActorSystem, ActorSystemConfig, JoinError};
#[cfg(reifydb_single_threaded)]
pub use wasm::{ActorHandle, ActorSystem, ActorSystemConfig, JoinError};
#[derive(Debug, Clone)]
pub struct ActorConfig {
pub mailbox_capacity: Option<usize>,
}
impl Default for ActorConfig {
fn default() -> Self {
Self {
mailbox_capacity: None,
}
}
}
impl ActorConfig {
pub fn new() -> Self {
Self::default()
}
pub fn mailbox_capacity(mut self, capacity: usize) -> Self {
self.mailbox_capacity = Some(capacity);
self
}
}