/ tokio Public
Don't inherit Send from parking_lot::*Guard #4359
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
tokio::sync::watch::Reftype can become
Sendif Tokio is compiled with the
parking_lotis compiled with its
send_guardfeature. This PR will prevent the
send_guardfeature from affecting whether Tokio types are
Strictly speaking, this PR is a breaking change, however I believe we should make the change regardless. As it stands now, the
parking_lotcrate is in our public API, and if don't want to make this change, then we should also commit to never upgrading
0.11.x, as such an upgrade would be also be a breaking change for the same reasons.
I don't think many people will be affected by this. Anyone who is affected is probably holding a
tokio::sync::watch::Refalive across an
.await, which is always incorrect.
The first commit in this PR adds a test to CI that should catch this in the future. The commit is first so we can see the test fail without the change. The test relies on