mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix indexeddb threadpool (#37649)
Resolves #37638. Fixes threadpool name and adds a config preference (`threadpools_indexeddb_workers_max`). Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
parent
2879aa264d
commit
476b05676f
2 changed files with 5 additions and 2 deletions
|
@ -165,14 +165,14 @@ impl IndexedDBManager {
|
|||
let thread_count = thread::available_parallelism()
|
||||
.map(|i| i.get())
|
||||
.unwrap_or(pref!(threadpools_fallback_worker_num) as usize)
|
||||
.min(pref!(threadpools_async_runtime_workers_max).max(1) as usize);
|
||||
.min(pref!(threadpools_indexeddb_workers_max).max(1) as usize);
|
||||
IndexedDBManager {
|
||||
port,
|
||||
idb_base_dir,
|
||||
databases: HashMap::new(),
|
||||
thread_pool: Arc::new(CoreResourceThreadPool::new(
|
||||
thread_count,
|
||||
"ImageCache".to_string(),
|
||||
"IndexedDB".to_string(),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue