Rewrote service trait join() method to allow thread join handles to return values other than ()
This commit is contained in:
parent
7601a8001c
commit
91cf14e641
|
@ -217,6 +217,7 @@ impl Service for BroadcastStage {
|
||||||
type JoinReturnType = ();
|
type JoinReturnType = ();
|
||||||
|
|
||||||
fn join(self) -> thread::Result<()> {
|
fn join(self) -> thread::Result<()> {
|
||||||
self.thread_hdl.join()
|
self.thread_hdl.join()?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@ impl Fullnode {
|
||||||
/// `--------` | | `------------`
|
/// `--------` | | `------------`
|
||||||
/// `-------------------------------`
|
/// `-------------------------------`
|
||||||
/// ```
|
/// ```
|
||||||
pub fn new_with_bank(
|
pub fn new_with_bank(
|
||||||
keypair: Keypair,
|
keypair: Keypair,
|
||||||
bank: Bank,
|
bank: Bank,
|
||||||
entry_height: u64,
|
entry_height: u64,
|
||||||
|
|
|
@ -146,7 +146,8 @@ impl Service for RecordStage {
|
||||||
type JoinReturnType = ();
|
type JoinReturnType = ();
|
||||||
|
|
||||||
fn join(self) -> thread::Result<()> {
|
fn join(self) -> thread::Result<()> {
|
||||||
self.thread_hdl.join()
|
self.thread_hdl.join()?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ impl Service for RequestStage {
|
||||||
type JoinReturnType = ();
|
type JoinReturnType = ();
|
||||||
|
|
||||||
fn join(self) -> thread::Result<()> {
|
fn join(self) -> thread::Result<()> {
|
||||||
self.thread_hdl.join()
|
self.thread_hdl.join()?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,8 @@ impl Service for JsonRpcService {
|
||||||
type JoinReturnType = ();
|
type JoinReturnType = ();
|
||||||
|
|
||||||
fn join(self) -> thread::Result<()> {
|
fn join(self) -> thread::Result<()> {
|
||||||
self.thread_hdl.join()
|
self.thread_hdl.join()?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue