Bright Chen

Results 217 comments of Bright Chen

https://github.com/apache/brpc/blob/b601c89aec9042a1f509ddbdad478aa4e3f118fe/src/butil/thread_key.h#L144-L154

Please add unit test for this case in test/brpc_server_unittest.cpp.

A design consideration is written in the comment. https://github.com/apache/brpc/blob/d5cdbe69a653684f6593b3448a685a27eb2621a1/src/bthread/butex.cpp#L197-L260

The default window size of LatencyRecorder qps is 10s.

@thorneliu 看#2251 的实现,需要一个user SocketSSLContext和SSLHandshakeComplete回调函数才能支持吧。

> 大概是一个提供 sslpolicy和nonsslpolicy的连接实现;具体再sslpolicy里面 需要处理ssl handshake等内容 将ssl逻辑都抽成SSLPolicy来是一个好主意。 虽然框架会基于目前框架的ssl设置提供一个默认的SSLPolicy,但是当用户需要自定义ssl handshake过程的时候,要这里逻辑写好,可能得去了解rpc实现(特别是Socket)。 > 然而基于SSL本身的options非常的多,各个用户对于SSL的options要求也不一样以及同时SSL的版本也在不断更新等理由, 导致brpc支持ssl功能代码难以具备普遍性,无法适应新的变化。 基于这个原因,自定义ssl handshake的复杂度应该是可以接受。

```c++ void* test(void*) { while (!brpc::IsAskedToQuit()) { sleep(2); bthread_yield(); } } for (int i = 0; i < 3; ++i) { bthread_t tid; bthread_start_background(&tid, NULL, test, NULL); } ``` Start...