A simple CPU rendered GUI IDE experience.
fewer threads
bendn 5 months ago
parent 41513d7 · commit bc57f22
-rw-r--r--src/lsp.rs1
-rw-r--r--src/main.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lsp.rs b/src/lsp.rs
index e5b1ce3..07ff21c 100644
--- a/src/lsp.rs
+++ b/src/lsp.rs
@@ -174,6 +174,7 @@ pub fn run(
ch_tx: ch_tx.clone(),
progress: Box::leak(Box::new(papaya::HashMap::new())),
runtime: tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(2)
.thread_name("lsp runtime")
.build()
.unwrap(),
diff --git a/src/main.rs b/src/main.rs
index 698acf4..35e9109 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -761,7 +761,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) {
};
},
);
- ch.map(|ch| thread::spawn(move || {
+ ch.map(|ch| thread::Builder::new().name("redrawer".into()).spawn(move || {
for () in ch {
PUT.get().map(|x| x.request_redraw());
}