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

Issue 697 #698

Closed
Closed

Conversation

jClaireCodesStuff
Copy link

Wrote a test case. It demonstrates that the master sends !Send results, and fails to compile after my changes. The existing 12 tests pass.

Removed unsafe impl of Sync and Send for ScopeFuture. Replaced it with:

  • Send bounds for the return types of the user's Future
  • a newtype wrapping ScopeHandle with unsafe impl Send

Now the only other type in the crate with unsafe impl is ScopeFutureWrapped.

I need help transforming the test into one that expects a compiler error.

I did not investigate whether sending ScopeHandle is sound.

…w rejected by a compiler

error.

`Sync` and `Send` are now derived by the compiler for `ScopeFuture`, except that the
`Send`-safety of `impl ScopeHandle` is is still asserted unsafety.  I did not review `rayon_core`
to judge whether that is correct.
Merge branch 'issue-697' of github.com:jClaireCodesStuff/rayon into issue-697
@cuviper
Copy link
Member

cuviper commented Dec 19, 2019

I do think you're right that this needs Send, but we also plan to just deprecate and remove the rayon-futures crate, since it's based on old futures. New integration will probably be added directly to rayon-core, something like #679.

This PR constitutes a breaking change, though it's to fix soundness, which we've allowed without a semver bump before. Plus rayon-futures requires the nasty --cfg=rayon_unstable anyway. So I'm thinking of pushing your changes to a new branch, along with publishing a new release that pins the compatible rayon-core minor version and marks rayon-futures deprecated. Then I will remove it for the new rayon-core minor version coming to the master branch.

Does this sound OK?

cuviper added a commit to cuviper/rayon that referenced this pull request Dec 19, 2019
bors bot added a commit that referenced this pull request Dec 21, 2019
715: Release and deprecate rayon-futures 0.1.1 r=cuviper a=cuviper

This includes the soundness fix from #698, just targeted to a new branch.

Co-authored-by: J Claire <jclairecodesstuff@users.noreply.github.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
@cuviper
Copy link
Member

cuviper commented Dec 22, 2019

I published rayon-futures 0.1.1 with this change.

@cuviper cuviper closed this Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants