celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] pnoltes opened a new pull request #286: Feature/async svc registration
Date Tue, 06 Oct 2020 18:57:06 GMT

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


   This PR **adds a async API for service registration, use services, service tracker, service
tracker tracker (listener hook) and bundle trackers**. 
   This can be used to - for example - directly get a service id, but let the actual service
registration be done at a later moment. This should make it easier to break long chains of
registration events which can easily run into dead locks.
   (So register a service async in a lock and at the service id to a list/map without worrying
that a register service event can chain back to the same object and run into a dead lock)
   
   An other big change is that all service registration, use service and trackers creations/destructions
are done on the one the same event loop, event the non async API calls. This means that with
this PR **all events for trackers and use service callbacks are done on the event loop**.

   
   The event loop is also updated to first use a ring buffer structure and if this fills fallback
to dynamicly allocated events.
   
   Also several thread issues are solved, found through the added async and event stress unit
tests.
   
   The findService(s) functionality is moved from the service tracker to the service registry
to ensure that this can be called without the needing/using the event loop thread. 
   
   Lastly the log_admin is updated as an example how the async api can be used.


----------------------------------------------------------------
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.

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



Mime
View raw message