<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/threading/thread_local/thread_local.h, branch CLI_2.30.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.30.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.30.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2025-11-27T21:47:44Z</updated>
<entry>
<title>Use generic thread-local value for kernel/groupattrs, crash context and eventlog scope</title>
<updated>2025-11-27T21:47:44Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-27T21:32:45Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=909e306757b2da405daed2e0838e11b65e033c1a'/>
<id>urn:sha1:909e306757b2da405daed2e0838e11b65e033c1a</id>
<content type='text'>
- fix StdThreadLocalImpl -- make static state refcounted, there is no guarantee that static fields will outlive threads or TThreadLocalValues;
- replace thread local values to generic local storage value in some places;
- call runtime Init and replace local values factory;
- don't disable NCurrentThreadEventlog for ytxx runtime, it should now work;
- ensure generic local storage values are allocated after runtime init;
- use function-scope static variables to prevent issues with order of construction and destruction;
- basesearch now almost works with coroutines (with NProfile disabled).
commit_hash:7fde81591b0dbc3a53b8d1cb11bb96930a2e9a80
</content>
</entry>
<entry>
<title>TThreadLocalValue over standard thread_locals</title>
<updated>2025-11-24T22:25:22Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-24T22:07:59Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f688bd5f5a6b127269d329a997ff5945cbcd5d87'/>
<id>urn:sha1:f688bd5f5a6b127269d329a997ff5945cbcd5d87</id>
<content type='text'>
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 &lt;https://nda.ya.ru/t/agWa9PW67NYAAK&gt;, looks better than all others;
- probably should switch to this implementation by default and remove old.
commit_hash:262ce4d363751f577373a452a0c2c84d1fe5b79c
</content>
</entry>
<entry>
<title>[libray/cpp/threading] Fix typo</title>
<updated>2024-11-05T14:58:17Z</updated>
<author>
<name>sskvor</name>
<email>sskvor@yandex-team.com</email>
</author>
<published>2024-11-05T14:31:53Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8e522d6580b57c8770f24e9f123e8f98d44de236'/>
<id>urn:sha1:8e522d6580b57c8770f24e9f123e8f98d44de236</id>
<content type='text'>
commit_hash:f76f3edfa160fba90d0f8d594211fa35c6eb6077
</content>
</entry>
<entry>
<title>fix tsan warnings in library/cpp/threading unit tests</title>
<updated>2024-09-12T16:43:48Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2024-09-12T16:28:16Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=20a8c1bdb3377f5cb86adc3173d7a329245ebaa1'/>
<id>urn:sha1:20a8c1bdb3377f5cb86adc3173d7a329245ebaa1</id>
<content type='text'>
- blocking_counter: fix destroy order;

- thread_local: Head_.load must use std::memory_order_acquire to match memory_order_release in compare_exchange and ensure all writes are visible; also fix always null node value in first compare_exchange call;

-  work_stealing: use atomics.
commit_hash:53f01a16bb40dd3eb890b0eb60388ecb0ce9c908
</content>
</entry>
<entry>
<title>fix ya.make</title>
<updated>2022-07-07T11:41:37Z</updated>
<author>
<name>monster</name>
<email>monster@ydb.tech</email>
</author>
<published>2022-07-07T11:41:37Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=06e5c21a835c0e923506c4ff27929f34e00761c2'/>
<id>urn:sha1:06e5c21a835c0e923506c4ff27929f34e00761c2</id>
<content type='text'>
</content>
</entry>
</feed>
