Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » OSGi services and thread-safety
OSGi services and thread-safety [message #1697195] Tue, 02 June 2015 10:04 Go to next message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 111
Registered: January 2015
Senior Member

Dear experts,
simply: should the access to OSGi services be synchronized?

For instance, is it proper or pointless instead to synchronize the access to an event broker when sending an event?

synchronized (eventBroker) {
                    eventBroker.send(EVENT_NAME, data);
}


Thanks,
-Piero
Re: OSGi services and thread-safety [message #1697250 is a reply to message #1697195] Tue, 02 June 2015 17:18 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
As I think sending an event doesn't change a state, it should not be necessary to synchronize.
Previous Topic:org.eclipse.e4.core.di.annotations in v. 1.5.0
Next Topic:Conflicting Handlers on Migration
Goto Forum:
  


Current Time: Mon Nov 20 15:42:40 GMT 2017

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

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