Skip to main content



      Home
Home » Archived » Sapphire » asynchronous model change
asynchronous model change [message #705546] Fri, 29 July 2011 22:10 Go to next message
Eclipse UserFriend
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 14:44 Go to previous messageGo to next message
Eclipse UserFriend
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 12:48 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 21:54:42 EDT 2025

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

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

Back to the top