File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ fn render_file_browser(
431431 . unwrap_or ( false ) ;
432432
433433 let duration = if !entry. is_dir {
434- if let Some ( cached_duration) = app. duration_cache . get ( & entry. path ) {
434+ if let Some ( cached_duration) = app. duration_cache . peek ( & entry. path ) {
435435 Some ( * cached_duration)
436436 } else if !app. duration_extraction_in_progress . contains ( & entry. path ) {
437437 files_to_extract. push ( entry. path . clone ( ) ) ;
@@ -468,7 +468,7 @@ fn render_file_browser(
468468 for path in files_to_extract {
469469 app. duration_extraction_in_progress . insert ( path. clone ( ) ) ;
470470 let sender = app. duration_sender . clone ( ) ;
471- std :: thread :: spawn ( move || {
471+ app . duration_thread_pool . execute ( move || {
472472 let duration = crate :: metadata:: duration:: extract_duration ( & path) ;
473473 let _ = sender. send ( ( path, duration) ) ;
474474 } ) ;
You can’t perform that action at this time.
0 commit comments