Hacker News new | ask | show | jobs
by Matthias247 1383 days 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?
1 comments

Yes, 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.

Yes - what throwaway said. Good suggestion as well to use sqlx instead.