Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove service_tracker.h service_tracker_customizer.h header and bundleContext_getServiceReference #87

Open
rlenferink opened this issue Sep 28, 2019 · 3 comments
Assignees
Labels
component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements.
Milestone

Comments

@rlenferink
Copy link
Member

The service_tracker.h and service_tracker_custimizer.h should be removed. Service tracker should be control-able from the bundle context (see CELIX-441)
Also remove the bundleContext_getServiceReference(s) this should also been unnecessary because of CEILX-441.

This make to total Celix API smaller


Original creation date: 10/Apr/2018
Reporter: @pnoltes

@rlenferink rlenferink added component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements. labels Sep 28, 2019
@rlenferink rlenferink added this to the 3.0.0 milestone Sep 28, 2019
@pnoltes pnoltes self-assigned this Feb 10, 2024
@pnoltes
Copy link
Contributor

pnoltes commented Feb 10, 2024

As discussed in https://lists.apache.org/thread/6gp5crw1pp408jw2fbwlg149n5rm36pv before the service tracker headers can be removed from the public API some additional tracker API in the bundle context is needed.

Mainly to be able to use tracked services out side of the celix event thread.

pnoltes added a commit that referenced this issue Feb 11, 2024
Also update the celix_bundleContext_trackServices usage.
pnoltes added a commit that referenced this issue Feb 25, 2024
Also:
 - Remove celix_bundleContext_trackService and
   celix_bundleContext_trackServiceAsync functions.
 - Update doxygen for useTrackedService* calls.
 - Remove celix_bundle_destroyServiceTrackerList. function
   by return an array list with a configured remove callback.
 - Remove waitTimeoutInSeconds option for
   celix_tracked_service_use_options_t.
@pnoltes
Copy link
Contributor

pnoltes commented Feb 25, 2024

With the addition of celix_bundleContext_useTrackedService* functions, the functions celix_bundleContext_useService* and methods celix::BundleContext::useService* are functional superfluous and less ideal to use (more prone to deadlocks).

  • Remove the the functions celix_bundleContext_useService* and methods celix::BundleContext::useService* to decrease the code size and improve the maintainability. Also introduce some testing methods to replace the useService with wait timeout usecase for testing.

PengZheng added a commit that referenced this issue Feb 26, 2024
PengZheng added a commit that referenced this issue Feb 27, 2024
Fix race condition in `celix_bundleContext_getDependencyManager` and avoid write lock when possible.
PengZheng added a commit that referenced this issue Feb 27, 2024
PengZheng added a commit that referenced this issue Mar 4, 2024
1. Use acquire-release pair to synchronize the service user with the service stopper.
2. Reduce CPU usage when waiting for service user.
3. Fix gcc -Wstringop-truncation warning.
pnoltes added a commit that referenced this issue Mar 9, 2024
Note that also means that useService* functions and
methods are no longer use-able in the Celix event thread.
pnoltes added a commit that referenced this issue Mar 24, 2024
@pnoltes
Copy link
Contributor

pnoltes commented Mar 24, 2024

With the addition of celix_bundleContext_useTrackedService* functions, the functions celix_bundleContext_useService* and methods celix::BundleContext::useService* are functional superfluous and less ideal to use (more prone to deadlocks).

* [x]  Remove the  the functions `celix_bundleContext_useService*`  and methods `celix::BundleContext::useService*`  to decrease the code size and improve the maintainability. Also introduce some testing methods to replace the useService with wait timeout usecase for testing.

Simplified the implementation of celix_bundleContext_useService* instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements.
Projects
None yet
Development

No branches or pull requests

2 participants