mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
refactor: helper methods for pool and max threads
This commit is contained in:
parent
806e983aa5
commit
865f24cfef
4 changed files with 30 additions and 27 deletions
|
@ -54,6 +54,10 @@ impl ThreadPoolNoAbortBuilder {
|
|||
ThreadPoolNoAbortBuilder::default()
|
||||
}
|
||||
|
||||
pub fn new_for_indexing() -> ThreadPoolNoAbortBuilder {
|
||||
ThreadPoolNoAbortBuilder::default().thread_name(|index| format!("indexing-thread:{index}"))
|
||||
}
|
||||
|
||||
pub fn thread_name<F>(mut self, closure: F) -> Self
|
||||
where
|
||||
F: FnMut(usize) -> String + 'static,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue