toolchains: Run listing tasks on background thread (#21414)

Potentially fixes #21404

This is a speculative fix, as while I was trying to repro this issue
I've noticed that introducing artificial delays in ToolchainLister::list
could impact apps responsiveness. These delays were essentially there to
stimulate PET taking a while to find venvs.

Release Notes:

- Improved app responsiveness in environments with multiple Python
virtual environments
This commit is contained in:
Piotr Osiewicz 2024-12-02 21:03:31 +01:00 committed by GitHub
parent b88daae67b
commit 59dc6cf523
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View file

@ -24,7 +24,7 @@ pub struct Toolchain {
pub as_json: serde_json::Value,
}
#[async_trait(?Send)]
#[async_trait]
pub trait ToolchainLister: Send + Sync {
async fn list(
&self,