Skip to content

Commit 496354f

Browse files
increase stack size of coroutine
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
1 parent eb2b421 commit 496354f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

include/xrpl/core/Coro.ipp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ JobQueue::Coro::Coro(Coro_create_t, JobQueue& jq, JobType type, std::string cons
88
, type_(type)
99
, name_(name)
1010
, running_(false)
11-
, coro_([this, fn = std::forward<F>(f)](boost::coroutines2::coroutine<void>::push_type& do_yield) {
12-
yield_ = &do_yield;
13-
yield();
14-
fn(shared_from_this());
11+
, coro_(
12+
boost::context::fixedsize_stack(4 * 1024 * 1024),
13+
[this, fn = std::forward<F>(f)](boost::coroutines2::coroutine<void>::push_type& do_yield) {
14+
yield_ = &do_yield;
15+
yield();
16+
fn(shared_from_this());
1517
#ifndef NDEBUG
16-
finished_ = true;
18+
finished_ = true;
1719
#endif
18-
})
20+
})
1921
{
2022
}
2123

0 commit comments

Comments
 (0)