You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by "Pepijn Noltes (JIRA)" <ji...@apache.org> on 2018/05/06 19:21:00 UTC

[jira] [Commented] (CELIX-443) Add bundle tracking API to bundle context

    [ https://issues.apache.org/jira/browse/CELIX-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465262#comment-16465262 ] 

Pepijn Noltes commented on CELIX-443:
-------------------------------------

An initial implementation is added, but currently locking is not working correctly. 
As far as I can see the framework.c needs an update bundle locking, I do not understand the current implementation and for me it seems to complex.

I think it is possible to use the same approach as in the service tracker: 
- lock the bundle list with a rw lock and
- per bundle entry maintain a (mutex protected) use count.
- The use count should also have a condition, so that it is possible to 
- a) remove a bundle from the list and then
- b) wait until the use count == 0


> Add bundle tracking API to bundle context
> -----------------------------------------
>
>                 Key: CELIX-443
>                 URL: https://issues.apache.org/jira/browse/CELIX-443
>             Project: Celix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 2.3.0
>            Reporter: Pepijn Noltes
>            Priority: Major
>             Fix For: 2.3.0
>
>         Attachments: bundle_context_additions_bundle_tracker.h
>
>
> Add bundle tracking API to bundle context to make it easier to track started bundles. 
> See attachment for proposed API.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)