Skip to content

Commit

Permalink
Replace SharedSender with the std Sender, which is now Sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
ditsing committed Nov 23, 2023
1 parent 18699fd commit 9a192c0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 61 deletions.
5 changes: 2 additions & 3 deletions raft/src/sync_log_entries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 7,7 @@ use crate::daemon_env::ErrorKind;
use crate::heartbeats::HEARTBEAT_INTERVAL;
use crate::peer_progress::PeerProgress;
use crate::remote::RemoteContext;
use crate::utils::{retry_rpc, SharedSender, RPC_DEADLINE};
use crate::utils::{retry_rpc, RPC_DEADLINE};
use crate::{
check_or_record, AppendEntriesArgs, Index, IndexTerm, InstallSnapshotArgs,
Peer, Raft, RaftState, ReplicableCommand, Term,
Expand All @@ -34,7 34,7 @@ impl Event {

#[derive(Clone)]
pub(crate) struct SyncLogEntriesComms {
tx: SharedSender<Event>,
tx: std::sync::mpsc::Sender<Event>,
}

impl SyncLogEntriesComms {
Expand Down Expand Up @@ -68,7 68,6 @@ pub(crate) fn create(
peer_size: usize,
) -> (SyncLogEntriesComms, SyncLogEntriesDaemon) {
let (tx, rx) = std::sync::mpsc::channel();
let tx = SharedSender::new(tx);
let peer_progress = (0..peer_size).map(PeerProgress::create).collect();
(
SyncLogEntriesComms { tx },
Expand Down
2 changes: 0 additions & 2 deletions raft/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 1,5 @@
pub use rpcs::{retry_rpc, RPC_DEADLINE};
pub use shared_sender::SharedSender;

pub mod do_nothing;
pub mod integration_test;
mod rpcs;
mod shared_sender;
56 changes: 0 additions & 56 deletions raft/src/utils/shared_sender.rs

This file was deleted.

0 comments on commit 9a192c0

Please sign in to comment.