[ 
https://issues.apache.org/jira/browse/FELIX-5178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre De Rop closed FELIX-5178.
--------------------------------

> 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-r8
>
>
> 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 object).
> 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
(v6.3.4#6332)

Reply via email to