Skip to content

Commit

Permalink
chore: 🎨 thread name after mako (#1601)
Browse files Browse the repository at this point in the history
* refactor: 🎨 rayon is not friendly to js users

* chore: ✏️ rename tokio worker with mako
  • Loading branch information
stormslowly authored Sep 19, 2024
1 parent c3f01be commit 457f3ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/mako/src/utils/thread_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ static THREAD_POOL: OnceLock<ThreadPool> = OnceLock::new();

fn build_rayon_thread_pool() -> ThreadPool {
ThreadPoolBuilder::new()
.thread_name(|i| format!("rayon thread {}", i))
.thread_name(|i| format!("Mako thread {}", i))
.build()
.expect("failed to create rayon thread pool.")
.expect("Mako failed to create thread pool.")
}

pub fn spawn<F>(func: F)
Expand Down
4 changes: 2 additions & 2 deletions crates/mako/src/utils/tokio_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ fn build_tokio_runtime() -> tokio::runtime::Runtime {
tokio::runtime::Builder::new_multi_thread()
.enable_io()
.worker_threads(2)
.thread_name("tokio-worker")
.thread_name("Mako-tokio-worker")
.build()
.expect("failed to create tokio runtime.")
.expect("Mako: failed to create tokio runtime.")
}

pub fn spawn<F>(future: F) -> tokio::task::JoinHandle<F::Output>
Expand Down

0 comments on commit 457f3ed

Please sign in to comment.