mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-23 20:58:18 +00:00
dd63267db7
sqlite doesn't have a native async interface, and instead will use traditional OS-level mutexes to ensure thread safety. Using those when under contention in a tokio scheduler thread can lead to blocking of the tokio scheduler threads, which can prevent timely delivery of data via websockets, or timely processing of incoming log records. This commit fixes up the sqlite access points to use tokio's spawn_blocking function to move that style of mutex acquisition to a more suitable context.