Sync trait not needed on run_interaction

LLM summary:

func only ever needs to be moved to a thread and called there sequentially, never shared by & across threads:

- In the erasure, func is captured by-move into the Box<dyn Fn ... + Send> callback (only Send is required to box it that way).
- The Python pool moves that callback into the runInteraction DB-thread closure and calls it there; the Rust pool calls it within a single async task. Neither sends &func to multiple threads concurrently.
This commit is contained in:
Eric Eastwood
2026-06-24 14:51:16 -05:00
parent 683f264a7f
commit adeb03960c
-1
View File
@@ -122,7 +122,6 @@ pub trait DatabasePoolExt: DatabasePool {
R: Send + 'static,
F: for<'txn> Fn(&'txn mut dyn Transaction) -> BoxFuture<'txn, anyhow::Result<R>>
+ Send
+ Sync
+ 'static,
{
// Erase the concrete return type `R` into `Box<dyn Any>` so we can call