-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
New DoublyBufferedData for suspended bthread #2225
Conversation
@wwbmmm 麻烦有空看看这个PR |
@chenBright 我看这个DoublyBufferedDataBthread大部分代码和DoublyBufferedData还是差不多的,是不是可以给DoublyBufferedData加一个bool模板参数,根据参数走不同的代码逻辑,这样改动小一些 |
改动本来是不大的。 |
template <typename T, typename TLS = Void, bool AllowSuspendBthread = false>
class DoublyBufferedData; 加bool模板参数的话,有一个问题:当AllowSuspendBthread=true(允许查询逻辑中挂起bthread)的时候,TLS 即使不为Void,DoublyBufferedData也是不支持自定义tls数据的。这样的实现好像不太友好,用户可能会比较迷惑为啥TLS没有生效吧。 或者加个 |
我觉得可以 |
@wwbmmm 改好了,有空看看 |
LGTM |
* New DoublyBufferedData for bthread * Use cond and ref array * DoublyBufferedData allows bthread suspended * optimize cond and var name
What problem does this PR solve?
Issue Number: resolve #2209
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: