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

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?

@Lucretiel
Copy link
Contributor Author

@Lucretiel Lucretiel commented Nov 28, 2020

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

@Lucretiel
Copy link
Contributor Author

@Lucretiel Lucretiel commented Nov 28, 2020

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

@Lucretiel
Copy link
Contributor Author

@Lucretiel Lucretiel commented Nov 28, 2020

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

@taiki-e
Copy link
Member

@taiki-e taiki-e commented Nov 28, 2020

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

Lucretiel added 5 commits Sep 8, 2020
- 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 Lucretiel force-pushed the Lucretiel:parker-updates branch from 927c3f8 to 4c0a106 Nov 28, 2020
@Lucretiel
Copy link
Contributor Author

@Lucretiel Lucretiel commented Nov 28, 2020

Done

Copy link
Member

@taiki-e taiki-e left a comment

Thanks!

bors r+

@bors
Copy link
Contributor

@bors bors bot commented Nov 29, 2020

Build succeeded:

@bors bors bot merged commit 6a6d2a5 into crossbeam-rs:master Nov 29, 2020
36 checks passed
36 checks passed
@github-actions
test (crossbeam, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam, nightly, windows-latest)
Details
@github-actions
test (crossbeam-channel, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-channel, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-channel, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-channel, nightly, windows-latest)
Details
@github-actions
test (crossbeam-deque, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-deque, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-deque, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-deque, nightly, windows-latest)
Details
@github-actions
test (crossbeam-epoch, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-epoch, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-epoch, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-epoch, nightly, windows-latest)
Details
@github-actions
test (crossbeam-queue, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-queue, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-queue, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-queue, nightly, windows-latest)
Details
@github-actions
test (crossbeam-skiplist, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-skiplist, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-skiplist, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-skiplist, nightly, windows-latest)
Details
@github-actions
test (crossbeam-utils, 1.36.0, ubuntu-latest)
Details
@github-actions
test (crossbeam-utils, 1.36.0, windows-latest)
Details
@github-actions
test (crossbeam-utils, nightly, ubuntu-latest)
Details
@github-actions
test (crossbeam-utils, nightly, windows-latest)
Details
@github-actions
features (1.36.0)
Details
@github-actions
features (nightly)
Details
@github-actions
dependencies
Details
@github-actions
rustfmt
Details
@github-actions
clippy
Details
@bors
bors Build succeeded
Details
bors bot added a commit that referenced this pull request Feb 20, 2021
Merge #659
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 <te316e89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

2 participants