this post was submitted on 13 Sep 2025
319 points (99.1% liked)

Programmer Humor

26372 readers
1156 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] RustyNova@lemmy.world 2 points 2 days ago

This is also part of my death, because it's much easier to not deadlock when you are FIFO.

Personally I went for the nuclear option, and any transaction is sent as a tokio task to make sure the transaction keeps getting polled despite other futures getting polled. Coupled with a generous busy timeout timer (60secs) and Wal mode, it works pretty well.

Probably should also put the mutex strategy (perhaps a tokio semaphore instead?) although due to lifetimes it might be hard to make a begin() function on my DB pool wrapper.

... Congratulations. You nerd snipped me. Time for it to go on the todo stack.

Hyped for it too, but wouldn't use until sqlx suport. Compile time checked queries are just so good. I don't use rustsqlite for that reason alone (you often don't need async SQLite anyways)