pnoltes commented on code in PR #569:
URL: https://github.com/apache/celix/pull/569#discussion_r1232152009


##########
libs/framework/include/celix_bundle_context.h:
##########
@@ -905,6 +905,22 @@ CELIX_FRAMEWORK_EXPORT long 
celix_bundleContext_installBundle(celix_bundle_conte
  */
 CELIX_FRAMEWORK_EXPORT bool 
celix_bundleContext_uninstallBundle(celix_bundle_context_t *ctx, long bndId);
 
+/**
+ * @brief Unload the bundle with the provided bundle id. If needed the bundle 
will be stopped first.
+ * Will silently ignore bundle ids < 0.
+ * Note that unloaded bundle is kept in bundle cache and can be reloaded with 
the celix_bundleContext_installBundle function.
+ *
+ * If this function is called on the Celix event thread, the actual stopping 
of the bundle will be done async and
+ * on a separate thread.
+ * If this function is called from a different thread than the Celix event 
thread, then the function will return after
+ * the bundle is stopped.
+ *
+ * @param ctx The bundle context
+ * @param bndId The bundle id to unload.
+ * @return true if the bundle is correctly unloaded. False if not.
+ */
+CELIX_FRAMEWORK_EXPORT bool 
celix_bundleContext_unloadBundle(celix_bundle_context_t *ctx, long bndId);

Review Comment:
   Agree, if needed we can make this public later but then I think the 
documentation also needs to be updated. 
   I do think that the concept of unloading/loading does fit Celix and is IMO a 
correct deviation from OSGi more fitted for a framework based on 
loading/unloading shared objects. 



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