Skip to content

Commit

Permalink
Print a slightly clearer message when failing to spawn a thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed Jan 22, 2019
1 parent 7001537 commit 2ec0e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ impl Builder {
pub fn spawn<F, T>(f: F) -> JoinHandle<T> where
F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
{
Builder::new().spawn(f).unwrap()
Builder::new().spawn(f).expect("failed to spawn thread")
}

/// Gets a handle to the thread that invokes it.
Expand Down

0 comments on commit 2ec0e85

Please sign in to comment.