-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added unsafe SendSEXP
to ownership
-module
#666
Conversation
I'm not familiar with the ownership.rs module. As I read this PR, it might be compiled down to the very same binary before and after. |
Thanks for your comment. It is indeed my intention not to convert pointers to |
3dd2fe4
to
e2424e6
Compare
I've rebased and removed commented code. |
This looks scary
|
Indeed. It is caused by the multithreaded issues we've been having. Restarting CI, will give us a success, by the luck of the draw. We can discuss this particular issue in #674, or other places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR on {rsgeo} it builds just fine and works as anticipated.
Cargo.lock
illustrating it is using this branch.
I feel confident in merging this. But since this is my first time getting familiar with the ownership module I'd like to ensure another set of eyes approve it. Would either @Ilia-Kosenkov or @sorhawell mind giving this another approval?
@Ilia-Kosenkov do you have some time this week to review this PR? |
I saw it, I will check it this weekend. |
@Ilia-Kosenkov where is your comment on |
Disregard my comment on |
All comments have been resolved, green checks abound. I'm going to merge! Thanks for your patience @CGMossa |
Currently, the
Ownership
module converts allSEXP
tousize
(?), such that they becomeSend
, so that the ownership module can be used from multiple threads.SEXP
in an explicitSend
type. Accessing the pointer would require safety comments, as it can only be accessed throughinner
andset_inner
.usize
and back.SendRobj
.Background
This came up when looking at why tests started to fail sporadically. This isn't meant to fix anything in particular,
but it adds an explicit unsafe layer that is involved with what the
ownership
-module currently does. If we get rid of multithreaded support, we'd still provide users with something similar to this, or they would write something themselves, see #659 for discussion.