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

Deadlock when updating observable value from within observation #19

Closed
lm2s opened this issue Mar 20, 2019 · 4 comments
Closed

Deadlock when updating observable value from within observation #19

lm2s opened this issue Mar 20, 2019 · 4 comments

Comments

@lm2s
Copy link
Contributor

lm2s commented Mar 20, 2019

I've just noticed that updating the value of an observable from within an observation results in deadlock because a mutex is being used to ensure thread safety. The mutex could be replaced by DispatchQueues and avoid this issue.
Is there a specific reason as to why mutexes are being used instead of DispatchQueues?

I can do a PR for this.

@roberthein
Copy link
Owner

🤔 Good point! I'm looking forward to your PR :)

@lm2s
Copy link
Contributor Author

lm2s commented Mar 22, 2019

Created PR #20 :) I've been testing it and everything seems to be working properly.

@roberthein
Copy link
Owner

Works great @lm2s, so I merged it. Thank you so much for this contribution. 🙏

@lm2s
Copy link
Contributor Author

lm2s commented Mar 23, 2019

@roberthein glad to contribute 🙂

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

2 participants