Commit 5fbc8492 authored by Andrew Smith's avatar Andrew Smith Committed by Facebook GitHub Bot

Workaround for opt-gcc compiler bug

Summary: This diff appears to work around a compiler bug in gcc10 with coroutines. GCC is not keeping alive a temporary passed to a coroutine function.

Reviewed By: nmagerko

Differential Revision: D29847926

fbshipit-source-id: 69e0fc4cece8f5d0e26647581800ad81b1e44c74
parent cc0f64d2
...@@ -357,11 +357,12 @@ class ResumableTransformProcessor : public TransformProcessorBase< ...@@ -357,11 +357,12 @@ class ResumableTransformProcessor : public TransformProcessorBase<
auto initializeResult = auto initializeResult =
co_await folly::coro::co_awaitTry(initializeTransform_()); co_await folly::coro::co_awaitTry(initializeTransform_());
if (initializeResult.hasException()) { if (initializeResult.hasException()) {
co_await processReceiverCancelled( auto closeResult =
initializeResult.template hasException<OnClosedException>() initializeResult.template hasException<OnClosedException>()
? CloseResult() ? CloseResult()
: CloseResult(std::move(initializeResult.exception())), : CloseResult(std::move(initializeResult.exception()));
true /* noRetriesAllowed */); co_await processReceiverCancelled(
std::move(closeResult), true /* noRetriesAllowed */);
co_return; co_return;
} }
auto [initialValues, inputReceiver] = std::move(initializeResult.value()); auto [initialValues, inputReceiver] = std::move(initializeResult.value());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment