-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
add Receiver::obtain_sender()
and Sender::obtain_receiver()
methods
#762
add Receiver::obtain_sender()
and Sender::obtain_receiver()
methods
#762
Conversation
Hi @amab8901, thanks for this PR and thanks for continuing to work on this! Apologies, but I think you may have also misunderstood the purpose or intent of this feature. Now that we properly handle disconnection, we also want to allow re-connection for the goal of fault recovery. Here's an example illustrating what we need.
Thus, what we need is a function like so (pseudocode): impl Receiver ... {
pub fn obtain_sender(&self) -> Sender ... {
....
} and the inverse for In contrast, your current changeset offers functions that return the set of tasks waiting to send or receive. There's no use case for this, and it's also a safety/correctness violation because we wouldn't want anyone else except the internal channel logic to modify that set of waiting senders/receivers. It would also be good to concurrently add a test case for this to the |
I just realized that some of these functions were added to the |
How do I use the |
I changed the |
You can run them in the Theseus terminal. By default, tests are not included in the build, so you can either explicitly include it in the build or include everything in the build with This is a relatively recent change to the build system, so it hasn't yet made it into the book. But it is documented in the Makefile as well as in the |
If you take a look at the Files changed tab on this PR, you'll see that there are still some merge conflict sections left in the code, which means you didn't resolve the conflicts. You can refer to your last PR where I described how to address that, or simply search the web for git tutorials on resolving merge conflicts. |
I encountered an interesting problem. Here's how it looks like: $ git branch
$ git status
$ cargo doc
I've been using I tried re-cloning Theseus from scratch into a temporary directory for comparison. It works fine there. I think it's caused by me playing around with What would be the best approach to solving this? Do I need to delete my current project locally and restart from scratch, or is there a better approach? |
Well you didn't need to delete your repo, but that's fine, we'll continue on your new PR. |
I was just having some issues starting the |
Solves the 2nd checkbox on #715