Skip to content
Discussion options

You must be logged in to vote

There is a workaround for systems without tailcalls. Resume operation on the coroutine handle would become a loop.
Tail calls is used in situations when a coroutine performs symmetrical transfer, ie. coroutine 1 suspends and then resumes coroutine 2.

Here is a sketch of how such workaround might look like

void resume(coro)
{
    do {
         coro = coro.real_resume_and_return_the_coro_to_transfer_or_nullptr();
    } while(coro);
}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@unicomp21
Comment options

@unicomp21
Comment options

@GorNishanov
Comment options

@unicomp21
Comment options

@unicomp21
Comment options

Answer selected by unicomp21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants