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

Maybe allow a listener to only receive "the most recent message"? #32

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

This is a suggestion from Michel.

Imagine we have a sender who is sending "$.redraw" messages, each of which 
gives some parameter defining the redraw.

One can conceive of a listener who wishes only to hear the most recent 
redraw message - any messages they "miss" are not of interest.

Thus, if the sender sends:

* redraw 1
* redraw 2
* redraw 3

and the listener then does "get next message", it only wants to read the 
"redraw 3" message, and not the preceding (presumably now irrelevant) 
messages.

This can probably be emulated by just having a loop that reads until there 
are no more messages (and then "using" the last message), but that's 
clumsy, and probably error prone.

Considerations:

1. What happens if the sender flags the message with ALL_OR_WAIT or 
ALL_OR_FAIL (presumably this listener should not be considered when 
judging whether this message can be sent?)

2. What happens if one of the messages is marked URGENT?

Original issue reported on code.google.com by [email protected] on 18 Mar 2010 at 3:33

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

1 participant