(refactor) Replace tokio::spawn_blocking with std thread for metadata preloading
(refactor) Replace tokio::spawn_blocking with std thread for metadata preloading - Use `std::thread` instead of Tokio's blocking pool to avoid potential thread starvation in async context - Ensures long-running metadata loading does not block Tokio workers
This commit is contained in:
@@ -701,7 +701,7 @@ impl QueueBackend for OpenHomeRenderer {
|
||||
|
||||
// Background worker: charge les métadonnées petit à petit sans bloquer personne
|
||||
let queue = self.queue.clone();
|
||||
tokio::task::spawn_blocking(move || {
|
||||
std::thread::spawn(move || {
|
||||
debug!("🔄 OpenHome: préchargement métadonnées queue en background");
|
||||
if let Ok(mut queue) = queue.lock() {
|
||||
// On ne fait que les 10 prochains titres maintenant, le reste on s'en fout
|
||||
|
||||
Reference in New Issue
Block a user