Update import/export remote service component to use locking instead of suspend strategy
@@ -263,13 +263,16 @@ private:
auto& cmp = ctx->getDependencyManager()->createComponent(std::make_unique<ImportedCalculator>(logHelper));
cmp.createServiceDependency<pubsub_publisher>(PUBSUB_PUBLISHER_SERVICE_NAME)
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setFilter(std::string{"(&(topic="}.append(invokeTopic).append(")(scope=").append(scope).append("))"))
.setCallbacks(&ImportedCalculator::setPublisher);
cmp.createServiceDependency<celix::PromiseFactory>()
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setCallbacks(&ImportedCalculator::setPromiseFactory);
cmp.createServiceDependency<celix::PushStreamProvider>()
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setCallbacks(&ImportedCalculator::setPushStreamProvider);
cmp.setCallbacks(&ImportedCalculator::init, &ImportedCalculator::start, &ImportedCalculator::stop, &ImportedCalculator::deinit);
@@ -512,15 +515,18 @@ private:
auto& cmp = ctx->getDependencyManager()->createComponent(std::make_unique<ExportedCalculator>(logHelper));
cmp.createServiceDependency<pubsub_publisher>(PUBSUB_PUBLISHER_SERVICE_NAME)
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setFilter(std::string{"(&(topic="}.append(returnTopic).append(")(scope=").append(scope).append("))"))
.setCallbacks(&ExportedCalculator::setPublisher);
cmp.createServiceDependency<celix::PromiseFactory>()
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setCallbacks(&ExportedCalculator::setPromiseFactory);
cmp.createServiceDependency<ICalculator>()
.setRequired(true)
+ .setStrategy(DependencyUpdateStrategy::locking)
.setFilter(std::string{"("}.append(celix::SERVICE_ID).append("=").append(svcId).append(")"))
.setCallbacks(&ExportedCalculator::setICalculator);
