You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- My current idea is to mix the command results into the feed of events.Den– Den2015-11-26 18:42:05 +00:00Commented Nov 26, 2015 at 18:42
- For the app that I work on, the initial load and any subsequent refresh both mean "go ask the server for the full list as of right now, and subscribe to all subsequent updates". Any events that show up during the refresh are correctly ignored (as they're from the old subscription). So, what is it about your use case that makes it incorrect to ignore those mid-refresh events? And since it's probably related, how do you retrieve the full list the first time around and on refresh?Ixrec– Ixrec2015-11-26 18:54:17 +00:00Commented Nov 26, 2015 at 18:54
- Why do you want a lockless pattern? It seems, from your description, that there is a great desire to have your object have one official state at any point in time, but lockless algorithms tend to rely on making that distinction more fuzzy. Also, by the word "show," is this a GUI? This would also affect the desire for lockless. Most of the solutions I have seen for what you are looking for involve a "feed of events" as you say. The official name for that activity is "journaling."Cort Ammon– Cort Ammon2015-11-26 19:03:00 +00:00Commented Nov 26, 2015 at 19:03
- @Ixrec there is a chance that some events will be published after the query run on server but before the client receives it. Initial load is done same way as refresh, so it has the same problem.Den– Den2015-11-27 09:11:43 +00:00Commented Nov 27, 2015 at 9:11
- @CortAmmon I probably misused the word "lockless". What I meant is that I would like to handle this in a RX-idiomatic way. Yes, it's a GUI.Den– Den2015-11-27 09:15:05 +00:00Commented Nov 27, 2015 at 9:15
| Show 4 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you