Skip to content

Commit

Permalink
Make JoinSet::poll_join_next public
Browse files Browse the repository at this point in the history
My use-case can be seen here apache/datafusion#6449.

I want to avoid needless Box::pin calls when I can just poll the underlying task.
  • Loading branch information
nvartolomei committed May 25, 2023
1 parent 9eb3f5b commit 325cb38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/task/join_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ impl<T: 'static> JoinSet<T> {
/// This can happen if the [coop budget] is reached.
///
/// [coop budget]: crate::task#cooperative-scheduling
fn poll_join_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<T, JoinError>>> {
pub fn poll_join_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<T, JoinError>>> {
// The call to `pop_notified` moves the entry to the `idle` list. It is moved back to
// the `notified` list if the waker is notified in the `poll` call below.
let mut entry = match self.inner.pop_notified(cx.waker()) {
Expand Down

0 comments on commit 325cb38

Please sign in to comment.