I was lead to believe that SQLite could be safely and efficiently used by multiple threads within a single process.
-
I was lead to believe that SQLite could be safely and efficiently used by multiple threads within a single process. Was I wrong?
-
I was lead to believe that SQLite could be safely and efficiently used by multiple threads within a single process. Was I wrong?
@mcc a sqlite connection pointer can be safely moved between threads, but it does not perform internal synchronization and so can not be used by more than one thread at the same time. you can open more connections and distribute connections among threads to get concurrency. in wal mode the concurrency can be parallel for reads, but at most only one writer will proceed at a time.
-
I was lead to believe that SQLite could be safely and efficiently used by multiple threads within a single process. Was I wrong?
Okay so
It appears Rocket foresaw the problem of, "our state management system stores only multithread-safe data but database connections like to be per-thread animals" and built an entire intricate connection-pool system for managing it
https://rocket.rs/guide/v0.5/state/#databases
Moreover, they have pre-built specific integrations with specific database engines, one of which is for Diesel, which I am using
https://api.rocket.rs/v0.5/rocket_db_pools/#supported-drivers
Problem: Their Diesel integration does not support sqlite!! Which I am using!!
-
Okay so
It appears Rocket foresaw the problem of, "our state management system stores only multithread-safe data but database connections like to be per-thread animals" and built an entire intricate connection-pool system for managing it
https://rocket.rs/guide/v0.5/state/#databases
Moreover, they have pre-built specific integrations with specific database engines, one of which is for Diesel, which I am using
https://api.rocket.rs/v0.5/rocket_db_pools/#supported-drivers
Problem: Their Diesel integration does not support sqlite!! Which I am using!!
On the face of it it appears that Rocket not supporting diesel->sqlite is downstream of the sqlite support for rust fundamentally not supporting async *throws things*
-
undefined oblomov@sociale.network shared this topic on