Skip to content
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

Updates to Parker #563

Merged
merged 5 commits into from
Nov 29, 2020
Merged

Updates to Parker #563

merged 5 commits into from
Nov 29, 2020

Conversation

Lucretiel
Copy link
Contributor

@Lucretiel Lucretiel commented Sep 8, 2020

  • No longer a possibility for a spurious wake (previously possible if using a timeout), and removed references to spurious wake in the documentation.
  • Implementation updates to park: now deadline based, and unified the code paths between timeout and no-timeout versions
  • Breaking Change park_timeout and park_deadline now report the reason for their return (timeout or unpark) in an enum.

If you'd rather not have this breaking change, I'm happy to revert that side of it and just focus on the spurious awakening prevention stuff.

Fixes #482

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 and sorry for the delay reviewing! The implementation looks good, but we recently released a new minor version of crossbeam-utils, so I would prefer not to do the breaking changes right now.

It might make sense to consider doing this in a future version (filed #601 to follow-up), but for now, can you revert the changes for UnparkReason?

@taiki-e taiki-e added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author label Nov 20, 2020
@Lucretiel
Copy link
Contributor Author

Sure thing, I'll get to it this weekend.

@Lucretiel
Copy link
Contributor Author

Lucretiel commented Nov 28, 2020

Done. Preserved the old version in a branch: https://github.com/Lucretiel/crossbeam/tree/unpark-reason

@taiki-e taiki-e removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author breaking change labels Nov 28, 2020
@Lucretiel
Copy link
Contributor Author

CI failures seem unrelated; they're being caused by an issue with rustup.

@taiki-e
Copy link
Member

taiki-e commented Nov 28, 2020

CI failure was fixed in #606. Could you rebase?

Lucretiel and others added 5 commits November 28, 2020 18:44
- No longer possibility for spurious wake
- Now reports unpark reason (timeout or unpark())Updates to parker
Remove checked_duration_since in favor of arithmetic and manual checks
`UnparkReason` implementation preserved in Lucretiel/crossbeam/unpark-reason
@Lucretiel
Copy link
Contributor Author

Done

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!

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 29, 2020

Build succeeded:

@bors bors bot merged commit 6a6d2a5 into crossbeam-rs:master Nov 29, 2020
bors bot added a commit that referenced this pull request Feb 20, 2021
659: Prepare for the next release r=taiki-e a=taiki-e

It's been over two months since the previous release. There are some improvements and deprecations in the master branch, and it would be nice to release them. Also, there is no breaking change that needs a major version bump.

Changes:

- crossbeam-epoch 0.9.1 -> 0.9.2
  - Add `Atomic::compare_exchange` and `Atomic::compare_exchange_weak`. (#628)
  - Deprecate `Atomic::compare_and_set` and `Atomic::compare_and_set_weak`. (#628)
  - Make `const_fn` dependency optional. (#611)
  - Add unstable support for `loom`. (#487)
- crossbeam-utils 0.8.1 -> 0.8.2
  - Deprecate `AtomicCell::compare_and_swap`. (#619)
  - Add `Parker::park_deadline`. (#563)
  - Improve implementation of `CachePadded`. (#636)
  - Add unstable support for `loom`. (#487)


Co-authored-by: Taiki Endo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Please clarify the behavior of Parker
2 participants