envoyer icon indicating copy to clipboard operation
envoyer copied to clipboard

Use spawn_blocking for database saving

Open matzipan opened this issue 4 years ago • 0 comments

Use task::spawn_blocking(|| {}).await; for database saving, to avoid blocking the UI thread. Even though it seems fast on some systems, it might still block on other systems and spinning off the database saving to another thread would remove the risk of blocking the UI thread.

matzipan avatar Jan 16 '22 14:01 matzipan