Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    f931f6ef
    MAINT-5232: Add LLCoros::get_id() to identify the running coroutine. · f931f6ef
    Nat Goodspeed authored
    Change the module-static thread_specific_ptr to a function-static
    thread_specific_ptr so it will be initialized on demand -- since LLSingleton
    will need to rely on get_id(). Note that since LLCoros isa LLSingleton, we
    must take great care to avoid circularity.
    
    Introduce a private helper class LLCoros::Current to obtain and bind that
    thread_specific_ptr. Change all existing internal references from the static
    thread_specific_ptr to the new Current helper class.
    f931f6ef
    History
    MAINT-5232: Add LLCoros::get_id() to identify the running coroutine.
    Nat Goodspeed authored
    Change the module-static thread_specific_ptr to a function-static
    thread_specific_ptr so it will be initialized on demand -- since LLSingleton
    will need to rely on get_id(). Note that since LLCoros isa LLSingleton, we
    must take great care to avoid circularity.
    
    Introduce a private helper class LLCoros::Current to obtain and bind that
    thread_specific_ptr. Change all existing internal references from the static
    thread_specific_ptr to the new Current helper class.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.