pnoltes commented on a change in pull request #286:
URL: https://github.com/apache/celix/pull/286#discussion_r507160980
##########
File path: libs/framework/gtest/src/bundle_context_bundles_tests.cpp
##########
@@ -378,6 +378,90 @@ TEST_F(CelixBundleContextBundlesTests, trackBundlesTest) {
celix_bundleContext_stopTracker(ctx, trackerId);
};
+
+TEST_F(CelixBundleContextBundlesTests, trackBundlesTestAsync) {
+ struct data {
+ std::atomic<int> installedCount{0};
+ std::atomic<int> startedCount{0};
+ std::atomic<int> stoppedCount{0};
+ };
+ struct data data;
+
+ auto installed = [](void *handle, const bundle_t *bnd) {
+ auto *d = static_cast<struct data*>(handle);
+ EXPECT_TRUE(bnd != nullptr);
+ d->installedCount.fetch_add(1);
Review comment:
true, but for atomics I prefer the more explicit functions.
----------------------------------------------------------------
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
|