Skip to content

Commit f591678

Browse files
committed
Add better comment; don't return Result<Lock, Error> (fails on Windows)
1 parent 683c9b9 commit f591678

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/python_spy.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,13 @@ impl PythonSpy {
232232
});
233233

234234
let join_handle = std::thread::spawn(move || {
235-
// This can fail if the receiver has timed out; silently ignore this, because we
236-
// don't care (the worker thread has already exceeded the timeout)
237-
let _ = tx.send(process.lock());
235+
// This can fail if the receiver in the main thread has timed out; silently ignore
236+
// this, because we don't care (this only happens when the worker thread has
237+
// already exceeded the timeout).
238+
match process.lock() {
239+
Ok(_) => tx.send(Ok(())),
240+
Err(error) => tx.send(Err(error))
241+
}
238242
});
239243

240244
Some(

0 commit comments

Comments
 (0)