reifydb_runtime/pool/
mod.rs1#[cfg(all(not(reifydb_single_threaded), not(reifydb_target = "dst")))]
9mod native;
10
11#[cfg(any(reifydb_single_threaded, reifydb_target = "dst"))]
12mod wasm;
13
14#[cfg(all(not(reifydb_single_threaded), not(reifydb_target = "dst")))]
15pub use native::Pools;
16#[cfg(any(reifydb_single_threaded, reifydb_target = "dst"))]
17pub use wasm::Pools;
18
19#[derive(Debug, Clone)]
20pub struct PoolConfig {
21 pub system_threads: usize,
22
23 pub query_threads: usize,
24
25 pub async_threads: usize,
26}
27
28impl Default for PoolConfig {
29 fn default() -> Self {
30 Self {
31 async_threads: 1,
32 system_threads: 2,
33 query_threads: 1,
34 }
35 }
36}
37
38impl PoolConfig {
39 pub fn sync_only() -> Self {
40 Self {
41 async_threads: 0,
42 system_threads: 1,
43 query_threads: 1,
44 }
45 }
46}