Added static pool spillover feature
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good

- Allows to utilize the full pool even if some subpools are full.
This commit is contained in:
2024-02-12 11:35:10 +01:00
parent 712dc718f9
commit c0692a3523
8 changed files with 164 additions and 68 deletions

View File

@ -9,7 +9,7 @@ const DUMMY_DATA: [u8; 4] = [0, 1, 2, 3];
#[test]
fn threaded_usage() {
let pool_cfg = StaticPoolConfig::new(vec![(16, 6), (32, 3), (8, 12)]);
let pool_cfg = StaticPoolConfig::new(vec![(16, 6), (32, 3), (8, 12)], false);
let shared_pool = Arc::new(RwLock::new(StaticMemoryPool::new(pool_cfg)));
let shared_clone = shared_pool.clone();
let (tx, rx): (Sender<StoreAddr>, Receiver<StoreAddr>) = mpsc::channel();