Было: MPMC FAA-очередь занятых элементов + такая же очередь свободных элементов Стало: MPMC FAA-очередь занятых элементов + битсет, отвечающий за свободные элементы
Битсет имеет операции push(index) и take_any() -> optional<size_t> Выглядит как массив атомиков, в которых один битик соответствует одному индексу. Я хотел минимизировать контеншн, потому 1. массив побит на блоки по 16 атомиков (128 байт, 1024 элемента-битика) 2. каждый поток имеет свой "родной" блок
На take_any() мы ищем битик в родном блоке. Если не нашли — начинаем проходить по чужим блокам. Прошли круг и ничего не нашли — очень жаль, вываливаемся
Есть у меня большие сомнения в линеаризуемости этого добра) Хотя пока читатель один, должно сходиться
Дальше буду смотреть, есть ли прок от замены MPMC очереди на MPSC, раз мне больше всё равно не надо
Было: MPMC FAA-очередь занятых элементов + такая же очередь свободных элементов Стало: MPMC FAA-очередь занятых элементов + битсет, отвечающий за свободные элементы
Битсет имеет операции push(index) и take_any() -> optional<size_t> Выглядит как массив атомиков, в которых один битик соответствует одному индексу. Я хотел минимизировать контеншн, потому 1. массив побит на блоки по 16 атомиков (128 байт, 1024 элемента-битика) 2. каждый поток имеет свой "родной" блок
На take_any() мы ищем битик в родном блоке. Если не нашли — начинаем проходить по чужим блокам. Прошли круг и ничего не нашли — очень жаль, вываливаемся
Есть у меня большие сомнения в линеаризуемости этого добра) Хотя пока читатель один, должно сходиться
Дальше буду смотреть, есть ли прок от замены MPMC очереди на MPSC, раз мне больше всё равно не надо
Channels are not fully encrypted, end-to-end. All communications on a Telegram channel can be seen by anyone on the channel and are also visible to Telegram. Telegram may be asked by a government to hand over the communications from a channel. Telegram has a history of standing up to Russian government requests for data, but how comfortable you are relying on that history to predict future behavior is up to you. Because Telegram has this data, it may also be stolen by hackers or leaked by an internal employee. After fleeing Russia, the brothers founded Telegram as a way to communicate outside the Kremlin's orbit. They now run it from Dubai, and Pavel Durov says it has more than 500 million monthly active users. As a result, the pandemic saw many newcomers to Telegram, including prominent anti-vaccine activists who used the app's hands-off approach to share false information on shots, a study from the Institute for Strategic Dialogue shows. Perpetrators of these scams will create a public group on Telegram to promote these investment packages that are usually accompanied by fake testimonies and sometimes advertised as being Shariah-compliant. Interested investors will be asked to directly message the representatives to begin investing in the various investment packages offered. "We as Ukrainians believe that the truth is on our side, whether it's truth that you're proclaiming about the war and everything else, why would you want to hide it?," he said.
from us