Rewrote service trait join() method to allow thread join handles to return values other than ()

This commit is contained in:
Carl 2018-09-12 15:05:22 -07:00 committed by Greg Fitzgerald
parent 7601a8001c
commit 91cf14e641
5 changed files with 9 additions and 5 deletions

View File

@ -217,6 +217,7 @@ impl Service for BroadcastStage {
type JoinReturnType = ();
fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
self.thread_hdl.join()?;
Ok(())
}
}

View File

@ -205,7 +205,7 @@ impl Fullnode {
/// `--------` | | `------------`
/// `-------------------------------`
/// ```
pub fn new_with_bank(
pub fn new_with_bank(
keypair: Keypair,
bank: Bank,
entry_height: u64,

View File

@ -146,7 +146,8 @@ impl Service for RecordStage {
type JoinReturnType = ();
fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
self.thread_hdl.join()?;
Ok(())
}
}

View File

@ -117,6 +117,7 @@ impl Service for RequestStage {
type JoinReturnType = ();
fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
self.thread_hdl.join()?;
Ok(())
}
}

View File

@ -71,7 +71,8 @@ impl Service for JsonRpcService {
type JoinReturnType = ();
fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
self.thread_hdl.join()?;
Ok(())
}
}