Skip to content

Commit 56fa647

Browse files
committed
Revert "Avoid a stack overflow when dealing with long chains of unwrapped tasks"
This reverts commit 4879059.
1 parent 64175b7 commit 56fa647

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/async++/task_base.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,7 @@ void unwrapped_finish(task_base* parent_base, Child child_task)
489489
// Set up a continuation on the child to set the result of the parent
490490
LIBASYNC_TRY {
491491
parent_base->add_ref();
492-
493-
// We can't use inline_scheduler here because a long chain of unwrapped
494-
// tasks could cause a stack overflow.
495-
child_task.then(unwrapped_func<Result, Child>(task_ptr(parent_base)));
492+
child_task.then(inline_scheduler(), unwrapped_func<Result, Child>(task_ptr(parent_base)));
496493
} LIBASYNC_CATCH(...) {
497494
// Use cancel_base here because the function object is already destroyed.
498495
static_cast<task_result<Result>*>(parent_base)->cancel_base(std::current_exception());

0 commit comments

Comments
 (0)