diff --git a/src/ripple/rpc/Yield.h b/src/ripple/rpc/Yield.h index 73dffafbc..f7e0aaa9e 100644 --- a/src/ripple/rpc/Yield.h +++ b/src/ripple/rpc/Yield.h @@ -78,15 +78,10 @@ private: struct YieldStrategy { enum class Streaming {no, yes}; - enum class UseCoroutines {no, yes}; /** Is the data streamed, or generated monolithically? */ Streaming streaming = Streaming::no; - /** Are results generated in a coroutine? If this is no, then the code can - never yield. */ - UseCoroutines useCoroutines = UseCoroutines::no; - /** How many bytes do we emit before yielding? 0 means "never yield due to number of bytes sent". */ std::size_t byteYieldCount = 0; diff --git a/src/ripple/rpc/impl/Yield.cpp b/src/ripple/rpc/impl/Yield.cpp index b604e787e..55406603f 100644 --- a/src/ripple/rpc/impl/Yield.cpp +++ b/src/ripple/rpc/impl/Yield.cpp @@ -70,9 +70,6 @@ YieldStrategy makeYieldStrategy (Section const& s) ys.streaming = get (s, "streaming") ? YieldStrategy::Streaming::yes : YieldStrategy::Streaming::no; - ys.useCoroutines = get (s, "use_coroutines") ? - YieldStrategy::UseCoroutines::yes : - YieldStrategy::UseCoroutines::no; ys.byteYieldCount = get (s, "byte_yield_count"); ys.accountYieldCount = get (s, "account_yield_count"); ys.transactionYieldCount = get (s, "transaction_yield_count"); diff --git a/src/ripple/server/impl/ServerHandlerImp.cpp b/src/ripple/server/impl/ServerHandlerImp.cpp index b1628ae52..f962985ee 100644 --- a/src/ripple/server/impl/ServerHandlerImp.cpp +++ b/src/ripple/server/impl/ServerHandlerImp.cpp @@ -181,24 +181,12 @@ ServerHandlerImp::onRequest (HTTP::Session& session) auto detach = session.detach(); - if (setup_.yieldStrategy.useCoroutines == - RPC::YieldStrategy::UseCoroutines::yes) - { - RPC::SuspendCallback suspend ( - [this, detach] (RPC::Suspend const& suspend) { - processSession (detach, suspend); - }); - RPC::Coroutine coroutine (suspend); - coroutine.run(); - } - else - { - m_jobQueue.addJob ( - jtCLIENT, "RPC-Client", - [=] (Job&) { - processSession (detach, RPC::Suspend()); - }); - } + RPC::SuspendCallback suspend ( + [this, detach] (RPC::Suspend const& suspend) { + processSession (detach, suspend); + }); + RPC::Coroutine coroutine (suspend); + coroutine.run(); } void