Skip to content

Conversation

mjsir911
Copy link

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_forever test but I can add that in as well pretty easily.

@mjsir911
Copy link
Author

mjsir911 commented Sep 23, 2025

this currently doesn't handle the possibility of:

  1. main process is registered to a name
  2. main process gets sent some data
  3. the name gets re-registered to a different process
  4. the main process then tries receive()ing on the named subject, to get the data that's existed on the mailbox
  5. previous behavior: would succeed, and allow any number of receive()s on names that the process is not registered to.
    current behavior: fails because the process is not registered to the name, even if there is some data for it in the mailbox. maybe this warrants a receive_unchecked()?

@lpil
Copy link
Member

lpil commented Sep 25, 2025

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.

@mjsir911
Copy link
Author

mjsir911 commented Sep 25, 2025

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 receive is run on a non-owned named subject

@lpil
Copy link
Member

lpil commented Sep 27, 2025

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.

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.

2 participants