3 ms·
Its not that surprising. If you want full coroutines that can yield from inside function calls then each coroutine is going to need to own a separate stack. Sin
by ufo 12y ago
Its not that surprising. If you want full coroutines that can yield from inside function calls then each coroutine is going to need to own a separate stack. Since you only have one C stack the coroutine stacks need to live on the heap.
Some coroutine implementations copy the coroutine stacks back into the main C stack before resuming execution but usually its not worth the trouble to do that and you just run everything on the heap.