mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-02-20 09:38:00 +08:00
Spawn rayon threads with names
This commit is contained in:
parent
93afeedcea
commit
1a1ede96de
@ -501,8 +501,10 @@ impl TryFrom<&IndexerOpts> for IndexerConfig {
|
|||||||
type Error = anyhow::Error;
|
type Error = anyhow::Error;
|
||||||
|
|
||||||
fn try_from(other: &IndexerOpts) -> Result<Self, Self::Error> {
|
fn try_from(other: &IndexerOpts) -> Result<Self, Self::Error> {
|
||||||
let thread_pool =
|
let thread_pool = rayon::ThreadPoolBuilder::new()
|
||||||
rayon::ThreadPoolBuilder::new().num_threads(*other.max_indexing_threads).build()?;
|
.thread_name(|index| format!("indexing-thread:{index}"))
|
||||||
|
.num_threads(*other.max_indexing_threads)
|
||||||
|
.build()?;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
log_every_n: Some(other.log_every_n),
|
log_every_n: Some(other.log_every_n),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user