Skip to content

Commit ee0d56f

Browse files
Bump to next crossbeam-utils
1 parent 776c98c commit ee0d56f

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

Cargo.lock

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ base64 = "0.13.0"
1717
bytes = "0.4.9"
1818
chrono = { version = "0.4", features = ["serde"] }
1919
crates-index = "0.16.2"
20-
crossbeam-utils = "0.5"
20+
crossbeam-utils = "0.8"
2121
crossbeam-channel = "0.5"
2222
csv = "1.0.2"
2323
docsrs-metadata = { git = "https://github.com/rust-lang/docs.rs/" }

src/runner/mod.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,21 @@ pub fn run_ex<DB: WriteResults + Sync>(
126126
&workers,
127127
);
128128

129-
scope(|scope| -> Fallible<()> {
129+
let r = scope(|scope| -> Fallible<()> {
130130
let mut threads = Vec::new();
131131

132132
for worker in &workers {
133133
let join =
134134
scope
135135
.builder()
136136
.name(worker.name().into())
137-
.spawn(move || match worker.run() {
138-
Ok(()) => Ok(()),
139-
Err(r) => {
140-
log::warn!("worker {} failed: {:?}", worker.name(), r);
141-
Err(r)
137+
.spawn(move |_| -> Fallible<()> {
138+
match worker.run() {
139+
Ok(()) => Ok(()),
140+
Err(r) => {
141+
log::warn!("worker {} failed: {:?}", worker.name(), r);
142+
Err(r)
143+
}
142144
}
143145
})?;
144146
threads.push(join);
@@ -147,7 +149,7 @@ pub fn run_ex<DB: WriteResults + Sync>(
147149
scope
148150
.builder()
149151
.name("disk-space-watcher".into())
150-
.spawn(|| {
152+
.spawn(|_| {
151153
disk_watcher.run();
152154
Ok(())
153155
})?;
@@ -161,9 +163,12 @@ pub fn run_ex<DB: WriteResults + Sync>(
161163
} else {
162164
bail!("some threads returned an error");
163165
}
164-
})?;
166+
});
165167

166-
Ok(())
168+
match r {
169+
Ok(r) => r,
170+
Err(panic) => std::panic::resume_unwind(panic),
171+
}
167172
}
168173

169174
fn join_threads<'a, I>(iter: I) -> bool

0 commit comments

Comments
 (0)