Switch Connection to use Arc instead of Rc

Connection needs to be Arc so that bindings can wrap it with `Mutex` for
multi-threading.
This commit is contained in:
Pekka Enberg 2025-06-16 10:08:00 +03:00
parent 7e9a25ebca
commit 90c1e3fc06
32 changed files with 124 additions and 187 deletions

View file

@ -21,7 +21,6 @@ use std::{
fmt,
io::{self, BufRead as _, Write},
path::PathBuf,
rc::Rc,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
@ -68,7 +67,7 @@ pub struct Limbo {
pub prompt: String,
io: Arc<dyn limbo_core::IO>,
writer: Box<dyn Write>,
conn: Rc<limbo_core::Connection>,
conn: Arc<limbo_core::Connection>,
pub interrupt_count: Arc<AtomicUsize>,
input_buff: String,
opts: Settings,