-
-
Notifications
You must be signed in to change notification settings - Fork 51
Add some better error handling with named pid receive() and receive_forever()
#91
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
base: main
Are you sure you want to change the base?
Conversation
|
this currently doesn't handle the possibility of:
|
|
Hello! That's an interesting point about messages in the inbox from a previously registered name. I wonder what would be best to do about that. |
maybe just verify that the subject is owned by the current process on subject creation, store it within the namedsubject & then assume it's receivable on? could also just give out a warning? or something? if |
|
That would mean that only the subject owner could make the subject, which would defeat the purpose of names! How about we document that a selector can be used if they want to avoid this check. |
7282e20 to
54f93ee
Compare
| /// *previously* registered to this process, and then got re-registered | ||
| /// to another. | ||
| /// To recieve messages on subjects not directed at the current pid, | ||
| /// use `Select` |
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.
Correct grammar and punctuation in documentation please 🙏
It doesn't return an error in this case, and there is no thing called Select.
Perhaps something like this:
You may wish to use named subject that was previously owned by the current process, in order to select messages that were received and still reside in the process mailbox. In this case you can use the
selectandselector_receivefunctions instead.
This is all kind of assuming that there can only be one pid registered to a name, but I think that's correct?
doesn't add a named process
receive_forevertest but I can add that in as well pretty easily.