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

Clarification on queued receives #309

Closed
MaxF12 opened this issue Mar 29, 2019 · 2 comments
Closed

Clarification on queued receives #309

MaxF12 opened this issue Mar 29, 2019 · 2 comments
Assignees

Comments

@MaxF12
Copy link
Collaborator

MaxF12 commented Mar 29, 2019

It should be made more clear in what order queued receives are considered, i.e. what happens if an application calls Receive(minIncompleteLength=20), then calls Receive(minIncompleteLength=1). What now happens if e.g. 10 bytes of data arrive? Will the second receive only be considered after the first has been fulfilled?

@britram britram added the API label May 8, 2019
@mwelzl
Copy link
Contributor

mwelzl commented Oct 21, 2019

It would seem natural to me that enqueuing is what it is - i.e., saying once "I can receive blocks of at least 20 bytes" cannot be undone.

So, if the sequence is:

  1. Receive(minIncompleteLength=20)
  2. Receive(minIncompleteLength=1)
  3. 10 bytes arrive

... then the first Receive call should be the one that matters, and the 10 bytes would have to wait until another 10 bytes arrive before the second Receive call can be processed.

I think that @tfpauly should add a clarifying sentence because his implementation probably already does it in one way or another.

@mwelzl mwelzl assigned mwelzl and tfpauly and unassigned mwelzl Oct 21, 2019
@MaxF12
Copy link
Collaborator Author

MaxF12 commented Oct 30, 2019

Perhaps its not such a big issue, but I think this would take the option away from application developers to have an OR option for receives. For example, an application would have no way to say that it wants to receive either something with minIncompleteLength 100 or MaxLength 10.

I also think there might be some confusion when it comes to requiring message ordering. For example:

  1. Application calls Receive(maxLength=10)
  2. Application calls Receive(maxLength=20)
  3. Message with length 20 arrives
  4. Message with length 10 arrives
  5. Application get received callback for message with length 10
  6. Application get received callback for message with length 20

For the application it now seems that the message with length 10 arrived before the one with length 20 even though that is not the case.

britram added a commit that referenced this issue Nov 21, 2019
Partial receives are not reordering preferences; fix #309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants