asynchronous model change [message #705546] |
Sat, 30 July 2011 02:10 |
Alex Smirnoff Messages: 28 Registered: July 2009 |
Junior Member |
|
|
If I have a separate thread that make a change to sapphire model, which at the same time is bound to UI, for example, a view. When doing that I am getting notorious "invalid thread access" exception. I understand that this is probably should be expected. To prevent this happening, I have to execute the model update in display thread. However, this makes model update logic depending on UI plugin (because of the use of Display.asyncExecute).
Main question here is: should sapphire take care of "protection" of asynchronous model mutation operations? Not making it thread safe of cause, but when bound to UI, should it execute logic that updates UI on display thread? May be it is s already possible, and I have overlooked the solution, sorry then.
I also think that binding to UI should not be the only use case for sapphire model.
-Alexander.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03174 seconds