|
|
Re: Concurrency contract of UI services (Eclipse 3.6.1) [message #666184 is a reply to message #666176] |
Tue, 19 April 2011 12:18 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 2011-04-19 14:04, Paul Webster wrote:
> The UI services must all be accessed on the UI thread, unless otherwise
> specified.
Where can this contract be found? I searched for it, but I could not
find it. Just the fact, that it is named UI services is not convincing
to me.
> With a few minor exceptions, almost all of our functionality
> accessed through parts or the window are not protected against
> multi-threaded access (as they're all UI related).
Don't you think that this should be documented? Please note that I'm not
asking for a IMenuService or any Eclipse-provided service to be
accessible from all threads, I'm asking whether my own services provided
via the UI services extension point to be thread-safe. My implementation
*within* the create-method of the AbstractServiceFactory *is*
thread-safe, so the limiting factor is the extension point infra
structure. I studied the contract of AbstractServiceFactory,
IServiceWithSources, IServiceLocator, and IDisposable, as well as the
description of the org.eclipse.ui.services extension point and no
constraints about concurrency is provided. If the intention is, that
getService must be called from within the UI thread, that should be
documented.
> We do sometimes make a case for specific pieces of the workbench to be
> thread-safe, like if you were using WorkbenchServiceRegistry to load
> non-UI related services. Although there would probably be implications
> for IServiceLocator as well.
How can I load non-UI related services from the WorkbenchServiceRegistry?
Thanks for your quick reply,
- Daniel
|
|
|
|
Powered by
FUDForum. Page generated in 0.03948 seconds