-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-10484: [C++] Make Future<> more generic #8591
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bkietz
force-pushed
the
10484-FuturevoidStatus-could-be
branch
4 times, most recently
from
November 6, 2020 16:08
d6fe5f0
to
77df07a
Compare
pitrou
reviewed
Nov 9, 2020
pitrou
reviewed
Nov 9, 2020
pitrou
reviewed
Nov 9, 2020
pitrou
reviewed
Nov 9, 2020
bkietz
force-pushed
the
10484-FuturevoidStatus-could-be
branch
from
November 11, 2020 19:13
ff56a85
to
2a14538
Compare
Can you rebase to get a clean ASAN build? |
pitrou
approved these changes
Nov 12, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
bkietz
force-pushed
the
10484-FuturevoidStatus-could-be
branch
from
November 12, 2020 18:00
2a14538
to
893c6b7
Compare
yordan-pavlov
pushed a commit
to yordan-pavlov/arrow
that referenced
this pull request
Nov 14, 2020
`Future<Status>` and `Future<void>` have been removed in favor of `Future<>`, whose `ValueType` is an empty struct. This is a statusy future but still provides a `result()` member function, which simplifies generic code handling `Future<T>` since special cases which avoid `result()` need not be written. Additionally, `Future<T>` is now convertible to a `Future<>` which views only its status, without allocation of new state/storage. This will expedite observing the statuses of heterogeneous collections of futures. Details: - `DeferNotOk` and `ExecuteAndMarkFinished` are no longer members of `Future<>` - Constructing finished Futures no longer locks the waiter mutex - Future now holds a `shared_ptr<FutureImpl>` directly. `FutureImpl` stores the Future's result in a type erased allocation. - `FutureStorage<>` and `FutureStorageBase` are obviated and have been removed - deleted `Executor::SubmitAsFuture()` since it isn't used and can be trivially replaced: `ex->SubmitAsFuture(f)` -> `DeferNotOk(ex->Submit(f))` Closes apache#8591 from bkietz/10484-FuturevoidStatus-could-be Authored-by: Benjamin Kietzman <[email protected]> Signed-off-by: Benjamin Kietzman <[email protected]>
GeorgeAp
pushed a commit
to sirensolutions/arrow
that referenced
this pull request
Jun 7, 2021
`Future<Status>` and `Future<void>` have been removed in favor of `Future<>`, whose `ValueType` is an empty struct. This is a statusy future but still provides a `result()` member function, which simplifies generic code handling `Future<T>` since special cases which avoid `result()` need not be written. Additionally, `Future<T>` is now convertible to a `Future<>` which views only its status, without allocation of new state/storage. This will expedite observing the statuses of heterogeneous collections of futures. Details: - `DeferNotOk` and `ExecuteAndMarkFinished` are no longer members of `Future<>` - Constructing finished Futures no longer locks the waiter mutex - Future now holds a `shared_ptr<FutureImpl>` directly. `FutureImpl` stores the Future's result in a type erased allocation. - `FutureStorage<>` and `FutureStorageBase` are obviated and have been removed - deleted `Executor::SubmitAsFuture()` since it isn't used and can be trivially replaced: `ex->SubmitAsFuture(f)` -> `DeferNotOk(ex->Submit(f))` Closes apache#8591 from bkietz/10484-FuturevoidStatus-could-be Authored-by: Benjamin Kietzman <[email protected]> Signed-off-by: Benjamin Kietzman <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Future<Status>
andFuture<void>
have been removed in favor ofFuture<>
, whoseValueType
is an empty struct. This is a statusy future but still provides aresult()
member function, which simplifies generic code handlingFuture<T>
since special cases which avoidresult()
need not be written. Additionally,Future<T>
is now convertible to aFuture<>
which views only its status, without allocation of new state/storage. This will expedite observing the statuses of heterogeneous collections of futures.Details:
DeferNotOk
andExecuteAndMarkFinished
are no longer members ofFuture<>
shared_ptr<FutureImpl>
directly.FutureImpl
stores the Future's result in a type erased allocation.FutureStorage<>
andFutureStorageBase
are obviated and have been removedExecutor::SubmitAsFuture()
since it isn't used and can be trivially replaced:ex->SubmitAsFuture(f)
->DeferNotOk(ex->Submit(f))