Remove useless ref counts
This commit is contained in:
parent
f107c6c2ca
commit
4223aff840
|
@ -11,12 +11,12 @@ use result::Result;
|
|||
use signature::PublicKey;
|
||||
use std::net::{SocketAddr, UdpSocket};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Mutex;
|
||||
use transaction::Transaction;
|
||||
|
||||
pub struct AccountingStage {
|
||||
pub output: Arc<Mutex<Receiver<Entry>>>,
|
||||
entry_sender: Arc<Mutex<Sender<Entry>>>,
|
||||
pub output: Mutex<Receiver<Entry>>,
|
||||
entry_sender: Mutex<Sender<Entry>>,
|
||||
pub acc: Accountant,
|
||||
historian_input: Mutex<Sender<Signal>>,
|
||||
historian: Mutex<Historian>,
|
||||
|
@ -30,8 +30,8 @@ impl AccountingStage {
|
|||
let historian = Historian::new(event_receiver, start_hash, ms_per_tick);
|
||||
let (entry_sender, output) = channel();
|
||||
AccountingStage {
|
||||
output: Arc::new(Mutex::new(output)),
|
||||
entry_sender: Arc::new(Mutex::new(entry_sender)),
|
||||
output: Mutex::new(output),
|
||||
entry_sender: Mutex::new(entry_sender),
|
||||
acc,
|
||||
entry_info_subscribers: Mutex::new(vec![]),
|
||||
historian_input: Mutex::new(historian_input),
|
||||
|
|
|
@ -5,12 +5,12 @@ use entry::Entry;
|
|||
use hash::Hash;
|
||||
use recorder::{ExitReason, Recorder, Signal};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Mutex;
|
||||
use std::thread::{spawn, JoinHandle};
|
||||
use std::time::Instant;
|
||||
|
||||
pub struct Historian {
|
||||
pub output: Arc<Mutex<Receiver<Entry>>>,
|
||||
pub output: Mutex<Receiver<Entry>>,
|
||||
pub thread_hdl: JoinHandle<ExitReason>,
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,8 @@ impl Historian {
|
|||
let (entry_sender, output) = channel();
|
||||
let thread_hdl =
|
||||
Historian::create_recorder(*start_hash, ms_per_tick, event_receiver, entry_sender);
|
||||
let loutput = Arc::new(Mutex::new(output));
|
||||
Historian {
|
||||
output: loutput,
|
||||
output: Mutex::new(output),
|
||||
thread_hdl,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue