summaryrefslogtreecommitdiffstats
path: root/util/thread
Commit message (Collapse)AuthorAgeFilesLines
* better fork-aware poola11ax2025-05-221-7/+14
| | | | | | | | | Было: при добавлении-удалении обьекта берем мьютекс, молимся чтобы тот не оказался залочен при форке, никак перед форком на лок не смотрим Помимо того что это просто не очень надежно, оно не всегда работает. Может случиться так что с мьютексом все нормально, но IntrusiveList все равно [скорапчен](HIDDEN_URL и список закольцован не там где надо (по всей видимости cpu reorder на apple m1 ехидничает). Стало: берем спинлок вместо мьютекса, в том числе берем его на время форка. commit_hash:94145ab392390a2c0b9f885275302082524606b2
* Add an option to disable the fork aware mode for TThreadPoolandybg2025-03-282-2/+14
| | | | | | | | | | | | | Продолжение починки крэшей при форке Ситуация такая же - используем subprocess для обработки данных ( subprocess не наши, написаны множеством команд на нескольких языках под конкретные ситуации), быстро избавиться от форка не получится. Есть шанс избавиться от этого пул треда, но тоже не быстро. Предлагается простое решение - не вызывать `TAtforkQueueRestarter::Get()`совсем, тогда не будет создание singletonа и вызова `pthread_atfork`. Все это под опцией `SetForkAware` - кто хочет может ее включать, для всех остальных ничего не изменится. Полная обратная совместимость, фикс ничего не мог зацепить. Проверил локально, вызова `pthread_atfork` нет в `unified agent` больше. Тесты на это очень сложно написать, без больших изменений в тред пуле, пробовал с перехватом `pthread_atfork`, к сожалении, не только `TAtforkQueueRestarter` им пользуется и нормально перехватить тоже не получилось. commit_hash:3711c6175ca64564f31f811ee1308d70ef6eb5e3
* Part of PR. Stylenae2022024-11-202-13/+26
| | | | | Часть большого ПР REVIEW:7264088 commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
* FixNamespaceComments in /utildmasloff2024-09-057-10/+10
| | | | | FixNamespaceComments in /util bb9152570d7c258798644ead5a59f604de05ef3b
* Set SpacesInLineCommentPrefix to 1 in /utildmasloff2024-08-171-1/+1
| | | | | Set SpacesInLineCommentPrefix to 1 in /util 3853f9ec5143722c1bebd8dc0ffc9b61a6c17657
* Intermediate changesrobot-piglet2024-04-022-4/+0
|
* Library import 6 (#888)AlexSm2024-01-091-1/+1
|
* Library import 2 (#639)AlexSm2023-12-221-2/+2
|
* Y_VERIFY->Y_ABORT_UNLESS at ^uilnurkh2023-10-101-1/+1
| | | | https://clubs.at.yandex-team.ru/arcadia/29404
* add ymake export to ydbalexv-smirnov2023-06-132-0/+22
|
* [util] Fix typo in IThreadPool descrshaprunovk2023-04-271-1/+1
|
* Revert ymake build from ydb oss exportalexv-smirnov2023-03-282-22/+0
|
* (no commit message)pg2023-03-281-3/+3
|
* add library/cpp/actors, ymake build to ydb oss exportalexv-smirnov2023-03-152-0/+22
|
* [util] Terminate instead of deadlock after fork with running thread poolssskvor2022-11-101-4/+8
| | | | | Контекст. В древнем странном коде обнаружили, что если создавать `TThreadPool` часто и конкуретно с запуском `TShellCommand`, то иногда последняя дедлочится: если начали выполнять конструктор `TThreadPool` и регистрацию в `TAtforkQueueRestarter`, захватив `TAtforkQueueRestarter::ActionMutex`, а в другом потоке параллельно сделали `fork`, то последний может форкнуться с залоченым мьютексом. Первым делом происходит вызов коллбеков из `pthread_atfork`, где мьютекс лочится заново. Конечно, форкаться в сложных программах с тредпулами категорически запрещено, но, подозреваю, много кода в аркадии так написано. Давайте как-то защитимся от такого.
* Add ydb changelogbazeltsev2022-07-111-1/+1
| | | updated
* IGNIETFERRO-1105 Get rid of TAtomic in thread/pool.cppeeight2022-05-171-7/+7
| | | | ref:3fa56aa890b75b7301a3193c2ee40106281a71cb
* IGNIETFERRO-1105 TAtomic -> std::atomic in util/generic/* and threadpooleeight2022-05-111-10/+9
| | | | ref:39a714b781c60dca9e3b946d870971076e14ab7c
* IGNIETFERRO-1105 TAtomic -> std::atomic in util/thread/lfqueue.heeight2022-05-042-80/+71
| | | | ref:8cf44e7b3fecd13c3a0c699a8c1c7abe780eab0b
* IGNIETFERRO-1105 TAtomic -> std::atomic in util/thread/lfstack.heeight2022-04-272-59/+64
| | | | ref:7fac644f716f0423df5d65d6ba11439ca0ca35d1
* remove unused includestobo2022-04-071-1/+0
| | | | ref:f8c119cf3a796a59ab5be4424e5364ba6a201d40
* intermediate changesarcadia-devtools2022-03-152-24/+0
| | | | ref:ca7a95e8c9a9d780f96497136a152091d54e61b5
* clang-tidy - move-constructor and move-assignment operators should be marked ↵tobo2022-02-282-2/+2
| | | | | | noexcept + pass some args by reference ref:5da43163e6b3c2499597234dc80ad47042259013
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.gridem2022-02-102-86/+86
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.gridem2022-02-102-86/+86
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.whitehead2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.whitehead2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.seege2022-02-101-12/+12
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.seege2022-02-101-12/+12
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.sievlev2022-02-101-9/+9
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.sievlev2022-02-101-9/+9
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.onpopov2022-02-102-4/+4
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.onpopov2022-02-102-4/+4
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.grig2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.grig2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.desertfury2022-02-101-34/+34
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.desertfury2022-02-101-34/+34
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.fippo2022-02-103-11/+11
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.fippo2022-02-103-11/+11
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.khlebnikov2022-02-101-5/+5
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.khlebnikov2022-02-101-5/+5
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.alex-sh2022-02-102-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.alex-sh2022-02-102-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.tender-bum2022-02-107-19/+19
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.tender-bum2022-02-107-19/+19
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.olegator2022-02-101-2/+2
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.olegator2022-02-101-2/+2
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.ironpeter2022-02-102-155/+155
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.ironpeter2022-02-102-155/+155
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.ivanzhukov2022-02-105-222/+222
|