apache / apache/brpc

bthread_concurrency 支持减少 concurrency

Open
#3,126 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Is your feature request related to a problem?**
N/A

**Describe the solution you'd like**
希望 bthread_concurrency 可以支持减少 concurrency

**Describe alternatives you've considered**
我们使用 Bthread 实现了协程池,同时我们使用 Bthread Tag Group 来实现不同协程池之间底层 Worker 的分组。现在我们期望不同协程池的 Worker 数量可以动态调节,以灵活适应不同的场景。
但是我们翻阅代码发现,bthread_concurrency 和 bthread_concurrency_by_tag 两个均不支持减少 concurrency。
请问这里不支持减少 concurrency 是否存在什么考量?以及是否有好的建议帮助我们实现这样的功能呢?感谢!

**Additional context/screenshots**
N/A

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Begin by locating the implementations and call sites for bthread_concurrency and bthread_concurrency_by_tag, then define how reducing concurrency should affect existing workers and tagged pools. Done should include dynamic reductions for both APIs with coverage for the requested worker-pool behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.