summaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/queue
diff options
context:
space:
mode:
authorkulikov <[email protected]>2025-11-25 01:07:59 +0300
committerkulikov <[email protected]>2025-11-25 01:25:22 +0300
commitf688bd5f5a6b127269d329a997ff5945cbcd5d87 (patch)
tree15564ded86e7d8f8a8f2b59055cca0269d6984ee /library/cpp/threading/queue
parent7af73a3de3b9a9faa4a8654f5a2b62adf21dded5 (diff)
TThreadLocalValue over standard thread_locals
Current TThreadLocal implementation doesn't destroy objects on thread exit (so we can't replace thread\_local tls value with it, and with TGenericLocalValue too), standard thread\_local values can't be class members. So try to reimplement TThreadLocalValue: - instead of adressing by thread id, address objects by uniq object id in thread\_local deque of all objects of current type; - use hashmap of all existing perthread deques to destroy objects with their TThreadLocal; - try to make object ids flat; - no complex lookup inside and no contention between tls.Get calls; - ShortLivedThreads ut now works; - some fixes in Trace ut, make threads outlive tls value; - benchmark results <https://nda.ya.ru/t/agWa9PW67NYAAK>, looks better than all others; - probably should switch to this implementation by default and remove old. commit_hash:262ce4d363751f577373a452a0c2c84d1fe5b79c
Diffstat (limited to 'library/cpp/threading/queue')
0 files changed, 0 insertions, 0 deletions