felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre De Rop (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-5178) Make some component parameters as volatile
Date Fri, 05 Feb 2016 09:26:39 GMT
Pierre De Rop created FELIX-5178:

             Summary: Make some component parameters as volatile
                 Key: FELIX-5178
                 URL: https://issues.apache.org/jira/browse/FELIX-5178
             Project: Felix
          Issue Type: Bug
          Components: Dependency Manager, Dependency Manager Lambda
    Affects Versions: org.apache.felix.dependencymanager-r1
            Reporter: Pierre De Rop
            Assignee: Pierre De Rop
             Fix For: 	org.apache.felix.dependencymanager-r7

Currently, all parameters passed to components/dependencies API are stored in non volatile
variables, because internally,  we are using a concurrent queue, which ensures "safe publication"
regarding memory visibility.

Now, this is all fine, except for the following case:

-The application creates and initialize a Component from one thread T1.

- Then later, from thread T2, the application starts the component (adds it to a DependencyManager

In this case, we should declare all API parameters in volatile attributes in order to ensure
safe visibility from T2 thread, when accessing to parameters that were set in the original
T1 thread.

This message was sent by Atlassian JIRA

View raw message