You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty new to RUST, but I'm not understanding something.
I've got a shared Pool which I initialize using a trait so that we can switch easly to MySQL or SQLite3 management.
When using MySQL, I create a tokio spawn, in which it waits for a certain amount of time, to execute a Insert batch.
When doing this insert batch, it seems like it's literally locking and freezing the rest of the application until it's done.
What am I doing wrong here, do I need to use a different method to make sure the rest of the application keeps on going while a tokio spawn is doing it's work ?
Explanation is appreciated, or examples how to avoid this.
Kind regards.
The text was updated successfully, but these errors were encountered:
Little add to this, colleague I'm working with, didn't wrap the pool inside a Arc<>, is that needed to make it work correctly in a threaded/async environment ? Basically, I'm running AXUM, which freeze up when the MySQL activity is happening, until it's done, and it continues again.
I stopped using this crate now.
Using SQLX, since it is fully async compatible.
Seems this crate is not meant to be used in async apps, unless I switch to deadpool.
Hi,
I'm pretty new to RUST, but I'm not understanding something.
I've got a shared Pool which I initialize using a trait so that we can switch easly to MySQL or SQLite3 management.
When using MySQL, I create a tokio spawn, in which it waits for a certain amount of time, to execute a Insert batch.
When doing this insert batch, it seems like it's literally locking and freezing the rest of the application until it's done.
What am I doing wrong here, do I need to use a different method to make sure the rest of the application keeps on going while a tokio spawn is doing it's work ?
Explanation is appreciated, or examples how to avoid this.
Kind regards.
The text was updated successfully, but these errors were encountered: