Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    a601c559
    MAINT-5232: Ensure that llcoro::get_id() returns distinct values. · a601c559
    Nat Goodspeed authored
    Until now, the "main coroutine" (the initial context) of each thread left
    LLCoros::Current() NULL. The trouble with that is that llcoro::get_id()
    returns that CoroData* as an opaque token, and we want distinct values for
    every stack in the process. That would not be true if the "main coroutine" on
    thread A returned the same value (NULL) as the "main coroutine" on thread B,
    and so forth. Give each thread's "main coroutine" a dummy heap CoroData
    instance of its own.
    a601c559
    History
    MAINT-5232: Ensure that llcoro::get_id() returns distinct values.
    Nat Goodspeed authored
    Until now, the "main coroutine" (the initial context) of each thread left
    LLCoros::Current() NULL. The trouble with that is that llcoro::get_id()
    returns that CoroData* as an opaque token, and we want distinct values for
    every stack in the process. That would not be true if the "main coroutine" on
    thread A returned the same value (NULL) as the "main coroutine" on thread B,
    and so forth. Give each thread's "main coroutine" a dummy heap CoroData
    instance of its own.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
llcoros.cpp 11.46 KiB