summaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/thread_local
Commit message (Collapse)AuthorAgeFilesLines
* Use generic thread-local value for kernel/groupattrs, crash context and ↵kulikov2025-11-283-18/+44
| | | | | | | | | | | | | eventlog scope - 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
* Switch generic tls to thread_local-based implkulikov2025-11-261-1/+1
| | | | | 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
* TThreadLocalValue over standard thread_localskulikov2025-11-251-0/+122
| | | | | | | | | | | | | | 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
* Generic thread (yt fiber, etc) local storagekulikov2025-11-183-1/+109
| | | | commit_hash:cc357d273b7ce5c911d194dd51fae5668877693c
* [libray/cpp/threading] Fix typosskvor2024-11-051-3/+3
| | | | commit_hash:f76f3edfa160fba90d0f8d594211fa35c6eb6077
* fix tsan warnings in library/cpp/threading unit testskulikov2024-09-121-5/+5
| | | | | | | | | - 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
* feat contrib: aiogram 3armenqa2024-01-196-176/+0
| | | | Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
* External build system generator release 65robot-ya-builder2023-12-051-3/+3
| | | | Update tools: yexport, os-yexport
* add darwin-arm64 CMakeListsdcherednik2023-11-202-0/+33
|
* Fix input variable missprintsvidyuk2023-08-304-0/+24
|
* All .ll files support in LLVM_BCsvidyuk2023-08-304-24/+0
|
* YT-19210: expose YQL shared library for YT.max422023-07-295-0/+143
| | | | After this, a new target libyqlplugin.so appears. in open-source cmake build. Diff in open-source YDB repo looks like the following: https://paste.yandex-team.ru/f302bdb4-7ef2-4362-91c7-6ca45f329264
* add ymake export to ydbalexv-smirnov2023-06-131-0/+12
|
* Revert ymake build from ydb oss exportalexv-smirnov2023-03-281-12/+0
|
* add library/cpp/actors, ymake build to ydb oss exportalexv-smirnov2023-03-151-0/+12
|
* fix ya.makemonster2022-07-072-0/+269