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
{{ message }}
Repository navigation
Check if initial_suspend can be used to detect context operation stacking #65
When we create a top level coroutine we know that initial suspend is called and the coroutine does not proceed. The question is, does this only happen to top level coroutines? Does this step get bypassed if you co_await the future. If it is the case that initial_suspend is skipped when a future is co_awaited, then we can use this to check if the context's memory usage is non-zero. If its non-zero then we know that its preloaded.
But this assumes that somehow co_awaiting a future changes what happens when the coroutine's factory function is called. I'm not sure if there is such an asymmetry.
This is obsolete as I determined that its better to stack operations at the point in which the future is created from the promise's get_return_object. The continuation for the context is always set to whatever was the active coroutine within the context.
Activity
kammce commentedon Apr 19, 2026
This is obsolete as I determined that its better to stack operations at the point in which the future is created from the promise's get_return_object. The continuation for the context is always set to whatever was the active coroutine within the context.
kammce commentedon Apr 19, 2026
The PR that did this: #89