diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2019-01-22 18:51:54 +0530 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2019-01-22 18:55:12 +0530 |
| commit | 2ec0e85305e69d7f6e1bc0c704a6566ad38232a4 (patch) | |
| tree | 02fcdcd70022843b9eb62763083e2c113c6412de /src/libstd/thread | |
| parent | 70015373b4980fbfa10130de4b0ce041f5b5da8b (diff) | |
| download | rust-2ec0e85305e69d7f6e1bc0c704a6566ad38232a4.tar.gz rust-2ec0e85305e69d7f6e1bc0c704a6566ad38232a4.zip | |
Print a slightly clearer message when failing to spawn a thread
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index a55b32c08a3..eb8e0c1c8ac 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -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. |
