I need an advice on design of next:
I have some objects that runs in separate threads and I need to show them in a GUI. The object may be thought as a model and there some views on them.
The major headache now is how to handle the syncronization without callbacks (and mutexes).
The problem is like this: when model changes it should emit a signal that something changed (put's it in a queue since direct connection is like a callback). When view gets notification it should query the model for change. The problem is when view gets a message the model may be changed again(or the signal is not valid by that time). Of course every such possibilities can be coded in the model quering methods with appropriate return codes - but this leads to very error prone code.
Is there any suggestion how to deal with such problems in an elegant way?

Meanwhile I am thinking to implement additional class that will function like a proxy - the GUI wll work with this proxy though signals and slots and this proxy will do all work against these objects through queued signals. Then there should a consistency between signals and data queried (since the queries will run against proxy - not an object). Basically it is about maintaining a state of the object twice - once in an object itself and second in the proxy. But I do not like this idea - so may be there are some better ideas how to implement this.