Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » asynchronous model change
asynchronous model change [message #705546] Sat, 30 July 2011 02:10 Go to next message
Alex Smirnoff is currently offline 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.
Re: asynchronous model change [message #707509 is a reply to message #705546] Mon, 01 August 2011 18:44 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 942
Registered: July 2009
Senior Member
That sounds like a bug. The renderer is responsible for insuring that the use of a UI framework conforms to that framework's API contract. In the case of SWT, this includes that the calls are made on the SWT UI thread.

Please open a bug. Make sure to include the full stack trace.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sapphire

- Konstantin
Re: asynchronous model change [message #709224 is a reply to message #707509] Wed, 03 August 2011 16:48 Go to previous message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 942
Registered: July 2009
Senior Member
To close the thread, there is a bug for this now:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=353686

All further discussion on this should happen in the bug.

- Konstantin
Previous Topic:JAXenter interview regarding Java EE Config Editors project
Next Topic:add multiple items to ModelElementList property
Goto Forum:
  


Current Time: Sat Oct 25 03:01:21 GMT 2014

Powered by FUDForum. Page generated in 0.01674 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software