Skip to content

Conversation

@nickkuk
Copy link
Contributor

@nickkuk nickkuk commented Sep 8, 2025

New tokio_util::task::JoinQueue structure as FIFO-ordered analog of tokio::task::JoinSet.

Issue: #7576

Edit: renamed from JoinDeque to JoinQueue.

@ADD-SP ADD-SP added C-enhancement Category: A PR with an enhancement or bugfix. A-tokio-util Area: The tokio-util crate M-task Module: tokio/task labels Sep 9, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should replicate most of the methods from JoinSet.

@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Sep 10, 2025
@nickkuk nickkuk force-pushed the join_deque branch 2 times, most recently from 2c34aef to 837875d Compare September 10, 2025 19:50
@nickkuk
Copy link
Contributor Author

nickkuk commented Sep 10, 2025

I think we should replicate most of the methods from JoinSet.

Ok, I pushed implementation of all methods except try_join_next and try_join_next_with_id. Do you know how to implement them?

@nickkuk nickkuk requested a review from ADD-SP September 10, 2025 20:04
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not the double-ended queue, I would suggest change it to another name.

@nickkuk nickkuk changed the title util: add JoinDeque structure util: add JoinQueue data structure Sep 11, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please avoid force-pushing during the review process.
  • Could you add tests for this feature?

@nickkuk
Copy link
Contributor Author

nickkuk commented Sep 15, 2025

@ADD-SP yes, added.

@ADD-SP ADD-SP removed the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Sep 17, 2025
@nickkuk
Copy link
Contributor Author

nickkuk commented Sep 18, 2025

It seems that now CI failed with errors unrelated to this PR's changes.

@ADD-SP should we restart CI, or should I update branch, or something else?

@ADD-SP
Copy link
Member

ADD-SP commented Sep 18, 2025

It seems that now CI failed with errors unrelated to this PR's changes.

@ADD-SP should we restart CI, or should I update branch, or something else?

These failures are caused by the recent Rust release (Rust 1.90.0), you could update the branch after #7630 is merged.

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, @nickkuk Could you sync the changes from the base branch?

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ADD-SP ADD-SP changed the title util: add JoinQueue data structure task: add tokio_util::task::JoinQueue Sep 20, 2025
@ADD-SP ADD-SP merged commit 1b98d5a into tokio-rs:master Sep 20, 2025
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio-util Area: The tokio-util crate C-enhancement Category: A PR with an enhancement or bugfix. M-task Module: tokio/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants