You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doesn't change the public API (the stack is still taken from the current
scheduler's stack pool), but introduces an undocumented initializer that
takes the stack and stack_bottom pointers.
This will allow a few scenarios, mostly for RFC 2:
- start fibers with a fake stack when we don't need to run the fibers,
for example during specs that only need fiber objects (and would leak
memory since we only release stacks after the fiber has run);
- during a cross execution context spawn, we can pick a stack from the
destination context instead of the current context (so we can recycle
stacks from fibers that terminated in the desination context).
* Add Fiber::Stack
Holds the stack limits and whether the stack can be reused (i.e.
released back into Fiber::StackPool).
Also abstracts accessing the first addressable pointer with 16-bytes
alignment (as required by most architectures) to pass to `makecontext`.
Co-authored-by: Johannes Müller <[email protected]>
0 commit comments