Skip to content

Commit 8960fba

Browse files
committed
Set thread name for writer threads
1 parent 5a22a9b commit 8960fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<'a> Table<'a> {
7979
))
8080
};
8181
let (writer_channel, rx) = mpsc::sync_channel(100);
82-
let writer_thread = thread::spawn(move || write_output(out, rx));
82+
let writer_thread = thread::Builder::new().name(format!("write {}", name)).spawn(move || write_output(out, rx)).unwrap_or_else(|err| fatalerr!("Error: failed to create writer thread: {}", err));
8383
let mut ownpath = String::from(path);
8484
if !ownpath.is_empty() && !ownpath.starts_with('/') { ownpath.insert(0, '/'); }
8585
if ownpath.ends_with('/') { ownpath.pop(); }

0 commit comments

Comments
 (0)