4 ms·
Slightly off topic question/comment: You are running an async server, together with a blocking database client? That sounds more like a very tricky place ot get
by Matthias247 4y ago
Slightly off topic question/comment: You are running an async server, together with a blocking database client? That sounds more like a very tricky place ot get started. Are you dispatching all your database queries into an extra threadpool?
- throwaway239219 4y agoYes, as you have expected tokio has spawn_blocking which allows you to throw misbehaving code into a thread pool. This started to disgust me so I jumped to sqlx.
- outside1234 4y agoYes - what throwaway said. Good suggestion as well to use sqlx instead.