Skip to content

Commit

Permalink
Make OrderingSender use circular buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Jun 13, 2024
1 parent c256cb2 commit 8d0d7f8
Show file tree
Hide file tree
Showing 10 changed files with 417 additions and 283 deletions.
5 changes: 4 additions & 1 deletion ipa-core/benches/oneshot/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ async fn run(args: Args) -> Result<(), Error> {

let _prep_time = Instant::now();
let config = TestWorldConfig {
gateway_config: GatewayConfig::new(args.active()),
gateway_config: GatewayConfig {
active: args.active().try_into().unwrap(),
..Default::default()
},
initial_gate: Some(Gate::default().narrow(&IpaPrf)),
..TestWorldConfig::default()
};
Expand Down
11 changes: 0 additions & 11 deletions ipa-core/src/helpers/buffers/circular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,6 @@ mod test {
}
}

impl TwoBytes {
fn iter() -> impl Iterator<Item = Self> {
let mut count = 0;
std::iter::repeat_with(move || {
let next = Self::from(&count);
count += 1;
next
})
}
}

impl Debug for TwoBytes {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.serialize_u16(u16::from_le_bytes(self.0))
Expand Down
1 change: 0 additions & 1 deletion ipa-core/src/helpers/buffers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod ordering_sender;
mod unordered_receiver;

#[allow(dead_code)]
mod circular;

pub use ordering_sender::OrderingSender;
Expand Down
Loading

0 comments on commit 8d0d7f8

Please sign in to comment.