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

To ensure thread safety change usages of stringbuilder to string. #6

Merged
merged 1 commit into from
Jan 19, 2020

Conversation

professordave
Copy link
Contributor

string is potentially being updated in 2 threads, both driven by Observable.interval. I could be wrong, I am new to reactive. But I think 2 Observable.Intervals() mean we have 2 different threads updating the stringbuilder which means we should use string.

I think just changing to string is enough as the only operation in the second thread is the clear, so higher level synchronization is not needed.

string is potentially being updated in 2 threads, both driven by Observable.interval.
Copy link
Owner

@ChrisPulman ChrisPulman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

@ChrisPulman ChrisPulman merged commit fb16c7c into ChrisPulman:master Jan 19, 2020
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