summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcommonutils.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-12-10 10:56:24 -0500
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 19:24:25 -0400
commit39e7b48317e3f0fe37d7398099ab1e38b97963bf (patch)
tree7734474fcadf89bfeeea1dbc099ccc33b3716ef6 /indra/llcommon/llcommonutils.h
parent3cd2beb97ef0d368d47b0b7efd242b3c709d01af (diff)
DRTVWR-476: Make llcoro::logname() distinguish different threads.
Actually, introduce static LLCoros::logname() and make the namespaced free function an alias for that. Because CoroData is a subclass of LLInstanceTracker with a key, every instance requires a distinct key. That conflicts with our "getName() returns empty string for default coroutine on thread" convention. Introduce a new CoroData constructor, specifically for the default coroutine on each thread, that initializes the getName() name to empty string while providing a distinct "mainN" key. Make get_CoroData() use that new constructor for its thread_local instance, passing an atomic<int> incremented each time we initialize one for a new thread. Then LLCoros::logname() returns either the getName() name or the key.
Diffstat (limited to 'indra/llcommon/llcommonutils.h')
0 files changed, 0 insertions, 0 deletions