KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In java's Observer pattern classes Observer and Observable , are calls made to Observable objects's notifyObservers(Object arg0) , in different threads, thread-safe? Example: I have multiple threads, all Observables , that will be calling notifyObservers(...) ever so often. All these threads report to a single Observer object. Will I encounter concurrency issues, and what would be a better way to solve this? I am aware of a possible solution using event listeners. However I am unsure how to implement it and also, I would like to stick with the Observer pattern implementation, if possible.
Tags (comma-separated)
Save Edits
Cancel