Can we wrap `wait` in publish under condition for first publish as it is no-op.
Open
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
```
pub fn publish(&mut self) -> &mut Self {
+if !first {
self.wait(&mut epochs);
+}
self.update_and_swap(&mut epochs)
}
```
On first publish call, there are no readers on the w_handle, so we can just wrap that in `not of first`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the publish method shown in the issue and trace how the first publish call relates to wait, epochs, and update_and_swap. Verify that wait is skipped only for the first publish and remains active for later calls; done means the existing behavior is preserved while the first-call no-op is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100