Update flow/ThreadHelper.actor.h

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
This commit is contained in:
Daniel Smith 2021-06-29 13:31:36 -04:00 committed by GitHub
parent 119a52c2e9
commit 23fc685518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -638,7 +638,7 @@ ThreadFuture<decltype(std::declval<F>()().getValue())> onMainThread(F f) {
Promise<Void> signal;
auto returnValue = new ThreadSingleAssignmentVar<decltype(std::declval<F>()().getValue())>();
returnValue->addref(); // For the ThreadFuture we return
// TODO: Is this cancellation logic actually needed?
// TODO: Is this cancellation logic actually needed?
Future<Void> cancelFuture = internal_thread_helper::doOnMainThread<decltype(std::declval<F>()().getValue()), F>(
signal.getFuture(), f, returnValue);
returnValue->setCancel(std::move(cancelFuture));