Skip to content

stack-like coroutine frame memory allocation #222

@microcai

Description

@microcai

when coro foo calls (or, precisely speeaking, awaits) bar, and bar awaits bob, the coro frame is allocated in foo, bar, bob order, and when their job done, the deallocating happens just in "reverse" order.

it works much like stacks, just with "final await to continuation ", not "ret".

logically speaking, it is a stack.

so, how about implementing promise type allocation with a stack like allocator ? And this allocator shall be "shared" with coroutines on the "same" call chain, aka, "a coperative user mode thread".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions