celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] pnoltes commented on a change in pull request #316: Initial executor abstraction to promise
Date Tue, 02 Feb 2021 10:55:15 GMT

pnoltes commented on a change in pull request #316:
URL: https://github.com/apache/celix/pull/316#discussion_r568507935



##########
File path: misc/experimental/promise/api/celix/impl/SharedPromiseState.h
##########
@@ -208,12 +224,36 @@ namespace celix::impl {
 *********************************************************************************/
 
 template<typename T>
-inline celix::impl::SharedPromiseState<T>::SharedPromiseState(const tbb::task_arena&
_executor) : executor{_executor} {}
+std::shared_ptr<celix::impl::SharedPromiseState<T>> celix::impl::SharedPromiseState<T>::create(std::shared_ptr<celix::IExecutor>
_executor, int priority) {
+    auto state = std::shared_ptr<celix::impl::SharedPromiseState<T>>{new celix::impl::SharedPromiseState<T>{std::move(_executor),
priority}};
+    std::weak_ptr<celix::impl::SharedPromiseState<T>> self = state;
+    state->setSelf(std::move(self));

Review comment:
       yes that works.




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