Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Blocking? #3

Open
veloii opened this issue Oct 16, 2023 · 0 comments
Open

DB Blocking? #3

veloii opened this issue Oct 16, 2023 · 0 comments

Comments

@veloii
Copy link

veloii commented Oct 16, 2023

Diesel is a synchronous db, so surely executing it will block the main thread on request without using web::block?

The current versions of Diesel (v1/v2) does not support asynchronous operations, so it is important to use the web::block function to offload your database operations to the Actix runtime thread-pool.

https://actix.rs/docs/databases/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant