You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/10/06 14:48:28 UTC

[GitHub] [arrow] bkietz opened a new pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

bkietz opened a new pull request #8362:
URL: https://github.com/apache/arrow/pull/8362


   


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



[GitHub] [arrow] pitrou commented on pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #8362:
URL: https://github.com/apache/arrow/pull/8362#issuecomment-705079813


   Flight test failure on AppVeyor is unrelated.


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



[GitHub] [arrow] bkietz commented on a change in pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
bkietz commented on a change in pull request #8362:
URL: https://github.com/apache/arrow/pull/8362#discussion_r501052555



##########
File path: cpp/src/arrow/util/future.h
##########
@@ -358,6 +357,13 @@ class Future {
     return fut;
   }
 
+  static Future DeferNotOk(Result<Future> maybe_future) {

Review comment:
       Will do




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



[GitHub] [arrow] pitrou commented on a change in pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #8362:
URL: https://github.com/apache/arrow/pull/8362#discussion_r500539248



##########
File path: cpp/src/arrow/util/future.h
##########
@@ -358,6 +357,13 @@ class Future {
     return fut;
   }
 
+  static Future DeferNotOk(Result<Future> maybe_future) {

Review comment:
       Can you add a docstring?

##########
File path: cpp/src/arrow/util/future.h
##########
@@ -154,9 +154,8 @@ class FutureStorage : public FutureStorageBase {
 
   Status status() const { return result_.status(); }
 
-  template <typename U>
-  void MarkFinished(U&& value) {
-    result_ = std::forward<U>(value);
+  void MarkFinished(Result<T> result) {

Review comment:
       Does this implicitly convert from any T-convertible U?




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



[GitHub] [arrow] github-actions[bot] commented on pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8362:
URL: https://github.com/apache/arrow/pull/8362#issuecomment-704335087


   https://issues.apache.org/jira/browse/ARROW-10196


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



[GitHub] [arrow] bkietz commented on a change in pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
bkietz commented on a change in pull request #8362:
URL: https://github.com/apache/arrow/pull/8362#discussion_r501053982



##########
File path: cpp/src/arrow/util/future.h
##########
@@ -154,9 +154,8 @@ class FutureStorage : public FutureStorageBase {
 
   Status status() const { return result_.status(); }
 
-  template <typename U>
-  void MarkFinished(U&& value) {
-    result_ = std::forward<U>(value);
+  void MarkFinished(Result<T> result) {

Review comment:
       Yes, because `Result<T>` already has that implicit constructor




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



[GitHub] [arrow] pitrou closed pull request #8362: ARROW-10196: [C++] Add Future::DeferNotOk

Posted by GitBox <gi...@apache.org>.
pitrou closed pull request #8362:
URL: https://github.com/apache/arrow/pull/8362


   


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