westonpace commented on a change in pull request #10205: URL: https://github.com/apache/arrow/pull/10205#discussion_r625504477
########## File path: cpp/src/arrow/util/thread_pool_test.cc ########## @@ -189,11 +189,7 @@ TEST_P(TestRunSynchronously, SpawnMoreNested) { auto top_level_task = [&](Executor* executor) -> Future<> { auto fut_a = DeferNotOk(executor->Submit([&] { nested_ran++; })); auto fut_b = DeferNotOk(executor->Submit([&] { nested_ran++; })); - return AllComplete({fut_a, fut_b}) - .Then([&](const Result<arrow::detail::Empty>& result) { - nested_ran++; - return result; - }); + return AllComplete({fut_a, fut_b}).Then([&]() { nested_ran++; }); Review comment: I took a stab at preventing `Then` callbacks accepting `Result<T>` but didn't make much headway and so I'd prefer to defer that to a future PR. The problem is that we have `Args` in `ContinueFuture` but no `T` to check if `Args[0] == Result<T>`. In the `Then` method we have `T` but no idea what `Args` are. I suspect there is someway to test if `Args[0]` is a `Result<?>` but I tried a few things and didn't figure it out. -- 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: us...@infra.apache.org