<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/threading/thread_local, branch main</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=main</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=main'/>
<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>Switch generic tls to thread_local-based impl</title>
<updated>2025-11-25T23:53:30Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-25T23:23:33Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=61867eee332aed34a56b71e57a40a6c52e712d36'/>
<id>urn:sha1:61867eee332aed34a56b71e57a40a6c52e712d36</id>
<content type='text'>
After this, it becomes possible to zerodiff replace thread\_local variables with generic local values. Replace default TThreadLocal with generic will lead to it's destruction on thread exit, but it seems to be more correct behavior (e.g., avoid leaks on thread pool restart).
commit_hash:6e5a0908ca239c1bac3ce6ba47de9e53290d6211
</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>Generic thread (yt fiber, etc) local storage</title>
<updated>2025-11-18T13:08:27Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-18T12:48:30Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=7b6a73defecf54640a9de7e0d9da969b2273295d'/>
<id>urn:sha1:7b6a73defecf54640a9de7e0d9da969b2273295d</id>
<content type='text'>
commit_hash:cc357d273b7ce5c911d194dd51fae5668877693c
</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>feat contrib: aiogram 3</title>
<updated>2024-01-19T10:10:03Z</updated>
<author>
<name>armenqa</name>
<email>armenqa@yandex-team.com</email>
</author>
<published>2024-01-19T09:23:50Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=2de0149d0151c514b22bca0760b95b26c9b0b578'/>
<id>urn:sha1:2de0149d0151c514b22bca0760b95b26c9b0b578</id>
<content type='text'>
Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
</content>
</entry>
<entry>
<title>External build system generator release 65</title>
<updated>2023-12-05T09:25:06Z</updated>
<author>
<name>robot-ya-builder</name>
<email>robot-ya-builder@yandex-team.com</email>
</author>
<published>2023-12-05T08:10:55Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=96458ea3c773a8a3edb707f73db0cdedbfcfad90'/>
<id>urn:sha1:96458ea3c773a8a3edb707f73db0cdedbfcfad90</id>
<content type='text'>
Update tools: yexport, os-yexport
</content>
</entry>
<entry>
<title>add  darwin-arm64 CMakeLists</title>
<updated>2023-11-20T11:34:20Z</updated>
<author>
<name>dcherednik</name>
<email>dcherednik@ydb.tech</email>
</author>
<published>2023-11-20T10:23:37Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=ffff7a34e41bf0dd7d5e0f3d78aeaebbf56200e6'/>
<id>urn:sha1:ffff7a34e41bf0dd7d5e0f3d78aeaebbf56200e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix input variable missprint</title>
<updated>2023-08-30T17:50:06Z</updated>
<author>
<name>svidyuk</name>
<email>svidyuk@yandex-team.com</email>
</author>
<published>2023-08-30T17:31:54Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=c76aaf823d18acf064939d806427b39cea1bbe16'/>
<id>urn:sha1:c76aaf823d18acf064939d806427b39cea1bbe16</id>
<content type='text'>
</content>
</entry>
</feed>
