<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/threading/thread_local/generic.cpp, 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>2026-06-08T18:16:24Z</updated>
<entry>
<title>Improve TGenericLocalValue, allow mixed thread-fiber-etc values</title>
<updated>2026-06-08T18:16:24Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2026-06-08T17:33:12Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=a6848417fed706ec4f89a589c2ea9aa54eb39829'/>
<id>urn:sha1:a6848417fed706ec4f89a589c2ea9aa54eb39829</id>
<content type='text'>
Make generic local values more safe and usable:

- instead of factory, register fiber/coroutine-aware "GLS (general local storage) contexts";
- put up to 4 (normally no more than 2 -- threads and one coroutine implementation) different "tls" variables into one generic, choose correct one from current execution context;
- suitable version of variable will be constructed on demand (no dependency from first usage);
- improve unit test too.
commit_hash:8586846a6a775bd66dffcdf58263f78042be2480
</content>
</entry>
<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>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>
</feed>
