apache / apache/brpc

bthread在rq is full时应先运行已有的job

Open
#204 7 comments 0 reactions 0 assignees View on GitHub
enhancement official
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

而不是sleep-spin(可能死锁)。
Update: bthread中的ready_to_run等一系列函数接口需要重新设计,主要是要传入TaskGroup** pg,也就是说这些函数可能导致调用的bthread做上下文切换。如果这么实现的话,一方面规避了可能的死锁,另一方面对创建bthread的频率做了throttle,wsq的capacity可以进一步调小。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.