pnoltes opened a new pull request, #741:
URL: https://github.com/apache/celix/pull/741

   This PR simplifies the implementation of `celix_bundleContext_useService*` 
functions to somewhat reduce the complexity of the framework library. 
   
   The updated `celix_bundleContext_useService*` functions now reuse the 
`celix_bundleContext_trackServices` function and 
`celix_bundleContext_useTrackedService*` functions, which has several 
consequences:
   
   - Every `celix_bundleContext_useService*` function will lead to a new, 
short-lived, tracker ID.
   - The provided use service callback is now called on the calling thread, not 
on the event thread.
   - The use service functions/methods cannot be called from the Apache Celix 
Event thread.
   - The support for use service flags is dropped (all calls are direct).
   - Using a single service with a timeout now uses a simple sleep.
   
   In my opinion, these changes are acceptable because the primary, and in my 
opinion only, use case for the `useService*` functions/methods is in test code. 
As a result, this PR also updates the `useService*` functions/methods 
documentation to clarify their intended use case. I also think that we do not 
need to deprecate the useService* functions/methods, ideally they should be 
moved to a "test-code-only" header but for now I think this is good enough. 
   
   Additionally, the usage of `celix_bundleContext_useService` in the help 
shell command has been refactored to direct service tracker usage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to