Skip to content

Implement Worker::is_same_as #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

james7132
Copy link

Currently it's not possible to tell if a Worker and a Stealer point to the same underlying queue. This make it difficult to tell which stealer to remove from a list and you have a local Worker on hand, or skip stealing from when given a global list of stealers. The implementation just forwards to Arc::ptr_eq on the inner buffer. Added a doctest as well.

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I'm positive about adding such a method.

@taiki-e taiki-e added crossbeam-deque S-waiting-on-bikeshed Status: Awaiting a decision on trivial things. labels Dec 7, 2024
@james7132 james7132 requested review from notgull and taiki-e July 1, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crossbeam-deque S-waiting-on-bikeshed Status: Awaiting a decision on trivial things.
Development

Successfully merging this pull request may close these issues.

3 participants