This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/split_celix_cxx_option
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/feature/split_celix_cxx_option
by this push:
new 66b4ec8a Fix Promise template deduction issue for cv-qualifiers
66b4ec8a is described below
commit 66b4ec8aa07e7730b71af78bab4a97adfd1d0823
Author: Pepijn Noltes <[email protected]>
AuthorDate: Sun Dec 4 19:39:37 2022 +0100
Fix Promise template deduction issue for cv-qualifiers
---
.../integration/gtest/src/RemoteServicesIntegrationTestSuite.cc | 1 -
libs/promises/api/celix/Promise.h | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
a/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc
b/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc
index 38fc08c8..277695b4 100644
---
a/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc
+++
b/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc
@@ -142,7 +142,6 @@ TEST_F(RemoteServicesIntegrationTestSuite,
InvokeRemoteCalcService) {
elapsed = std::chrono::system_clock::now() - start;
while (!promise.isSuccessfullyResolved() && elapsed <
std::chrono::seconds{5}) {
//assuming failure, because pubsub connection is not fully
established (needs both ends)
- std::this_thread::sleep_for(std::chrono::milliseconds{10});
promise = calc.add(2, 4);
promise.wait();
elapsed = std::chrono::system_clock::now() - start;
diff --git a/libs/promises/api/celix/Promise.h
b/libs/promises/api/celix/Promise.h
index 3d1312d8..f1699924 100644
--- a/libs/promises/api/celix/Promise.h
+++ b/libs/promises/api/celix/Promise.h
@@ -480,7 +480,7 @@ namespace celix {
operator*()
{ return this->getValue(); }
private:
- const std::shared_ptr<celix::impl::SharedPromiseState<T>> state;
+ std::shared_ptr<celix::impl::SharedPromiseState<T>> state;
friend class Promise<void>;
};
@@ -550,7 +550,7 @@ namespace celix {
template<typename U>
[[nodiscard]] celix::Promise<U>
then(std::function<celix::Promise<U>(celix::Promise<void>)> success,
std::function<void(celix::Promise<void>)> failure = {});
private:
- const std::shared_ptr<celix::impl::SharedPromiseState<void>> state;
+ std::shared_ptr<celix::impl::SharedPromiseState<void>> state;
};
}