]> git.lizzy.rs Git - rust.git/commitdiff
This patch shortens the spawned threads' names, as threads on Linux
authorManas <manas18244@iiitd.ac.in>
Thu, 8 Jul 2021 12:39:41 +0000 (18:09 +0530)
committerManas <manas18244@iiitd.ac.in>
Thu, 8 Jul 2021 12:57:54 +0000 (18:27 +0530)
have an upper limit of 16 characters for their names.

crates/flycheck/src/lib.rs
crates/proc_macro_api/src/process.rs
crates/proc_macro_srv/src/proc_macro/bridge/server.rs
crates/vfs-notify/src/lib.rs

index e55f74bc452686cd07667ab78f4ac72be72880b5..3f98f14592ca7a8900ad44f2935784b06f530d7b 100644 (file)
@@ -68,7 +68,7 @@ pub fn spawn(
         let actor = FlycheckActor::new(id, sender, config, workspace_root);
         let (sender, receiver) = unbounded::<Restart>();
         let thread = jod_thread::Builder::new()
-            .name("FlycheckThread".to_owned())
+            .name("Flycheck".to_owned())
             .spawn(move || actor.run(receiver))
             .expect("failed to spawn thread");
         FlycheckHandle { sender, thread }
@@ -270,7 +270,7 @@ fn spawn(mut child: JodChild) -> CargoHandle {
         let (sender, receiver) = unbounded();
         let actor = CargoActor::new(child_stdout, sender);
         let thread = jod_thread::Builder::new()
-            .name("CargoHandleThread".to_owned())
+            .name("CargoHandle".to_owned())
             .spawn(move || actor.run())
             .expect("failed to spawn thread");
         CargoHandle { child, thread, receiver }
index 19f854dba12b66eb5f99272f5482e378d92261ca..91d6a3811be22f59cb8ee90ad75527cb4037bad7 100644 (file)
@@ -38,7 +38,7 @@ pub(crate) fn run(
 
         let (task_tx, task_rx) = bounded(0);
         let handle = jod_thread::Builder::new()
-            .name("ProcMacroClientThread".to_owned())
+            .name("ProcMacroClient".to_owned())
             .spawn(move || {
                 client_loop(task_rx, process);
             })
index 29b340445efe03c2b74a7d677607cdfd97f762cf..731d302196f31b117d7f76d45690f183457ed188 100644 (file)
@@ -182,7 +182,7 @@ fn run_bridge_and_client<D: Copy + Send + 'static>(
         let (res_tx, res_rx) = channel();
 
         let join_handle = thread::Builder::new()
-            .name("DispatchThread".to_owned())
+            .name("Dispatch".to_owned())
             .spawn(move || {
                 let mut dispatch = |b| {
                     req_tx.send(b).unwrap();
@@ -231,7 +231,7 @@ enum State<T> {
         let server_thread = thread::current();
         let state2 = state.clone();
         let join_handle = thread::Builder::new()
-            .name("ServerThread".to_owned())
+            .name("ProcMacroServer".to_owned())
             .spawn(move || {
                 let mut dispatch = |b| {
                     *state2.lock().unwrap() = State::Req(b);
index ca341ddae92f774d8a97034871fccb7c2134745b..7815556f5a162c6f2d68ccf830464f3c981402fc 100644 (file)
@@ -32,7 +32,7 @@ fn spawn(sender: loader::Sender) -> NotifyHandle {
         let actor = NotifyActor::new(sender);
         let (sender, receiver) = unbounded::<Message>();
         let thread = jod_thread::Builder::new()
-            .name("LoaderThread".to_owned())
+            .name("VfsLoader".to_owned())
             .spawn(move || actor.run(receiver))
             .expect("failed to spawn thread");
         NotifyHandle { sender, thread }