Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    9008124d
    DRTVWR-476: Keep coroutine-local data on toplevel()'s stack frame. · 9008124d
    Nat Goodspeed authored
    Instead of heap-allocating a CoroData instance per coroutine, storing the
    pointer in a ptr_map and deleting it from the ptr_map once the
    fiber_specific_ptr for that coroutine is cleaned up -- just declare a stack
    instance on the top-level stack frame, the simplest C++ lifespan management.
    Derive CoroData from LLInstanceTracker to detect potential name collisions and
    to enumerate instances.
    
    Continue registering each coroutine's CoroData instance in our
    fiber_specific_ptr, but use a no-op deleter function.
    
    Make ~LLCoros() directly pump the fiber scheduler a few times, instead of
    having a special "LLApp" listener.
    9008124d
    History
    DRTVWR-476: Keep coroutine-local data on toplevel()'s stack frame.
    Nat Goodspeed authored
    Instead of heap-allocating a CoroData instance per coroutine, storing the
    pointer in a ptr_map and deleting it from the ptr_map once the
    fiber_specific_ptr for that coroutine is cleaned up -- just declare a stack
    instance on the top-level stack frame, the simplest C++ lifespan management.
    Derive CoroData from LLInstanceTracker to detect potential name collisions and
    to enumerate instances.
    
    Continue registering each coroutine's CoroData instance in our
    fiber_specific_ptr, but use a no-op deleter function.
    
    Make ~LLCoros() directly pump the fiber scheduler a few times, instead of
    having a special "LLApp" listener.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.