Expand bank benches to include async/sync and native_loader (#4026)

This commit is contained in:
Jack May
2019-04-29 13:09:11 -07:00
committed by GitHub
parent c2193a37ce
commit c545e812d0
3 changed files with 148 additions and 48 deletions

View File

@ -191,8 +191,7 @@ impl BankClient {
}
}
pub fn new(bank: Bank) -> Self {
let bank = Arc::new(bank);
pub fn new_shared(bank: &Arc<Bank>) -> Self {
let (transaction_sender, transaction_receiver) = channel();
let transaction_sender = Mutex::new(transaction_sender);
let thread_bank = bank.clone();
@ -206,6 +205,10 @@ impl BankClient {
transaction_sender,
}
}
pub fn new(bank: Bank) -> Self {
Self::new_shared(&Arc::new(bank))
}
}
#[cfg(test)]