Skip to content

Commit

Permalink
spsc: add note warning about inlining pop
Browse files Browse the repository at this point in the history
  • Loading branch information
cbiffle committed May 1, 2024
1 parent 4914c56 commit f6818e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions os/src/spsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ impl<T> Popper<'_, T> {
/// resolves to a popped element. If you drop it before it has resolved,
/// no data is lost.
pub async fn pop(&mut self) -> T {
// NOTE: recognizing this function is what allows lilosdbg to show tasks
// waiting to pop from queues -- inlining the contained future will
// require debugger changes.
self.q.pushed.until(move || self.try_pop()).await
}
}
Expand Down

0 comments on commit f6818e1

Please sign in to comment.