Skip to content

[p2p]: remove redundant schedule call in simulated transmitter begin#3278

Open
VolodymyrBg wants to merge 1 commit intocommonwarexyz:mainfrom
VolodymyrBg:fix/p2p-remove-redundant-schedule
Open

[p2p]: remove redundant schedule call in simulated transmitter begin#3278
VolodymyrBg wants to merge 1 commit intocommonwarexyz:mainfrom
VolodymyrBg:fix/p2p-remove-redundant-schedule

Conversation

@VolodymyrBg
Copy link
Contributor

Why

State::enqueue already recalculates scheduling after launch, while launch -> begin also called schedule(now).
This caused duplicate queue scans in the normal successful start path without changing state.

What changed

  • Removed the extra self.schedule(now) call from begin() in p2p/src/simulated/transmitter.rs.
  • Kept scheduling at call sites enqueue, wake, finish so behavior stays the same while avoiding redundant work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant