{"id":18720438,"url":"https://github.com/stiffstream/so5_tricky_thread_pool_disp_ru","last_synced_at":"2025-06-22T20:41:36.840Z","repository":{"id":92244957,"uuid":"206545715","full_name":"Stiffstream/so5_tricky_thread_pool_disp_ru","owner":"Stiffstream","description":"Демонстрация создания пользовательского thread_pool-диспетчера для SObjectizer-а, который использует собственную политику распределения заявок между рабочими нитями в пуле.","archived":false,"fork":false,"pushed_at":"2022-04-22T05:10:38.000Z","size":16,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-28T11:28:15.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stiffstream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-05T11:18:16.000Z","updated_at":"2022-04-22T05:09:28.000Z","dependencies_parsed_at":"2023-06-08T03:30:19.665Z","dependency_job_id":null,"html_url":"https://github.com/Stiffstream/so5_tricky_thread_pool_disp_ru","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5_tricky_thread_pool_disp_ru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5_tricky_thread_pool_disp_ru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5_tricky_thread_pool_disp_ru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5_tricky_thread_pool_disp_ru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stiffstream","download_url":"https://codeload.github.com/Stiffstream/so5_tricky_thread_pool_disp_ru/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239583560,"owners_count":19663220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:31:04.402Z","updated_at":"2025-02-19T02:25:39.726Z","avatar_url":"https://github.com/Stiffstream.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Что это?\nЭто демонстрация создания собственного thread_pool-диспетчера для SObjectizer-а,\nкоторый использует собственную политику распределения заявок между\nрабочими нитями в пуле. Данный код служит иллюстрацией для статьи\nна Хабрхабр: [\"Пишем собственный хитрый thread_pool-диспетчер для SObjectizer-а\"](https://habrahabr.ru/post/353712/).\n\nВнутри репозитория два имитационных примера:\n\n* adv_thread_pool_case. Использует штатный adv_thread_pool-диспетчер из состава SObjectizer-а;\n* tricky_disp_case. Использует собственный хитрый thread_pool-диспетчер.\n\n# Как взять и попробовать?\nДля экспериментов потребуется С++ компилятор с поддержкой C++17 (проверялось\nна gcc-7.3 и vc++ 15.6).\n\nДля компиляции потребуется CMake или Ruby+MxxRu.\n\n## Компиляция с помощью CMake\n\nДля компиляции с помощью CMake нужно загрузить архив с именем вида `so5_tricky_thread_pool_disp_ru-*-full.zip` из секции [Releases](https://github.com/Stiffstream/so5_tricky_thread_pool_disp_ru/releases). После чего:\n\n```sh\nunzip so5_tricky_thread_pool_disp_ru-202204220800-full.zip\ncd so5_tricky_thread_pool_disp_ru/dev\nmkdir cmake_build\ncd cmake_build\ncmake ..\ncmake --build . --config Release\n```\n\nСкомпилированные примеры должны оказаться внутри подкаталога `bin`.\n\n**Примечание.** Поддержка CMake была добавлена 2022.04, в более старых версиях примера сборка с помощью CMake не предусмотрена.\n\n## Компиляция с помощью MxxRu\nДля компиляции с помощью MxxRu потребуется Ruby и RubyGems (как правило, RubyGems устанавливается вместе с Ruby, но если это не так, то RubyGems нужно поставить явно). Для установки MxxRu нужно выполнить команду:\n\n```sh\ngem install Mxx_ru\n```\n\nПосле того как Ruby, RubyGems и MxxRu установлены можно брать примеры непосредственно из Git-репозитория:\n\n```sh\ngit clone https://github.com/Stiffstream/so5_tricky_thread_pool_disp_ru\ncd so5_tricky_thread_pool_disp_ru\nmxxruexternals\ncd dev\nruby build.rb\n```\n\nЛибо же можно загрузить архив с именем вида `so5_tricky_thread_pool_disp_ru-*-full.zip` из секции [Releases](https://github.com/Stiffstream/so5_tricky_thread_pool_disp_ru/releases). После чего:\n\n```sh\nunzip so5_tricky_thread_pool_disp_ru-201909051500-full.zip\ncd so5_tricky_thread_pool_disp_ru/dev\nruby build.rb\n```\n\nСкомпилированные примеры должны оказаться внутри подкаталога `target/release`.\n\nТакже перед сборкой может быть полезно выполнить:\n\n```sh\ncp local-build.rb.example local-build.rb\n```\n\nи нужным вам образом отредактировать содержимое `local-build.rb`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiffstream%2Fso5_tricky_thread_pool_disp_ru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstiffstream%2Fso5_tricky_thread_pool_disp_ru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiffstream%2Fso5_tricky_thread_pool_disp_ru/lists"}