westonpace commented on a change in pull request #12099: URL: https://github.com/apache/arrow/pull/12099#discussion_r780457910
########## File path: cpp/src/arrow/dataset/dataset_writer.cc ########## @@ -328,12 +328,12 @@ class DatasetWriterDirectoryQueue : public util::AsyncDestroyable { uint64_t rows_written() const { return rows_written_; } void PrepareDirectory() { - init_future_ = - DeferNotOk(write_options_.filesystem->io_context().executor()->Submit([this] { + init_future_ = DeferNotOk( + write_options_.filesystem->io_context().executor()->Submit([this]() -> Future<> { Review comment: It would probably be a good addition to allow executor submission tasks to return futures but I don't think this actually works today. The future you are returning from the task will be discarded without being awaited. I think you'll need to change it to... `init_future_ = SubmitTask(CreateDir).Then(DeleteDirContentsAsync);` -- 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. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org