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

Latched RealtimePublisher is racy on startup #24

Open
mikepurvis opened this issue Jan 8, 2018 · 0 comments
Open

Latched RealtimePublisher is racy on startup #24

mikepurvis opened this issue Jan 8, 2018 · 0 comments

Comments

@mikepurvis
Copy link

Discovered this in my application— didn't matter whether I made the initial unlockAndPublish call from the realtime or non-realtime thread, it still would only go through sometimes. Obviously once everything's properly initialized then the most recent message is properly persisted and it doesn't matter, but it would be nice to reliably see that initial latched message.

I think this could be handled in client code by checking is_running(), except that that method is private; the ideal solution would be for unlockAndPublish itself to make a check somehow, and if the publish loop is not up or not yet waiting on the condition, set a flag so that it knows there's an initial message to be published (or even just introduce a separate method which can be used to seed the publisher from non-realtime with an initial message).

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

No branches or pull requests

1 participant