Commits

Benjamin Kietzman authored 30516049522
ARROW-10484: [C++] Make Future<> more generic `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 #8591 from bkietz/10484-FuturevoidStatus-could-be Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>