#What is the best way to deal with commands that do an expensive task?

2 messages · Page 1 of 1 (latest)

weak coral
#

Hi, I am currently using rust_search to search the file system for a specific file, but this is an expensive task, it takes a bit as well. How can I defer the response of this command?

lone coral
#

I'd use an async command + tokio::spawn_blocking, assuming that the search isn't async itself