Fix blocking_lock panic inside async runtime, reduce pool to 4 connections
spawn_with_arc used blocking_lock() which panics inside tokio runtime. Changed to async lock().await. Reduced StoragePool from 8 to 4 connections for Android compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
43adbbdf7d
commit
7b9edc13da
3 changed files with 7 additions and 7 deletions
|
|
@ -37,7 +37,8 @@ pub struct StoragePool {
|
|||
slots: Vec<tokio::sync::Mutex<Storage>>,
|
||||
}
|
||||
|
||||
const STORAGE_POOL_SIZE: usize = 8;
|
||||
/// Pool size: 4 connections balances parallelism with resource constraints (Android fd limits).
|
||||
const STORAGE_POOL_SIZE: usize = 4;
|
||||
|
||||
impl StoragePool {
|
||||
/// Create a pool of Storage connections to the same database.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue