Bright Chen
Bright Chen
在Socket::StartWrite之前,Socket::Write会判断已经_overcrowded就返回了,内存应该不会无限制增加吧。
Perhaps we can introduce babylon to improve the performance of bvar. Users can choose whether to use bvar with babylon through a switch.
Related issue: https://github.com/baidu/babylon/issues/89
Sorry, I'm not familiar with bazel. @wwbmmm Is there anyone familiar with bazel who can review it?
bthread_id_unlock的返回值是什么?
发rpc的时候,已经lock bthread_id了,bthread_id_unlock_and_destroy实际是在bthread_id_unlock里被调的,这在设计的时候已经考虑到了。 bthread_id的使用是不是有改动?或者定位一下这个EINVAL返回值实际是哪里返回的。
> 第一次需要使用keytbale时构造,并赋值给task_meta.local_storage. keytable,task_meta析构时销毁keytable。 我理解这是为了尽量复用、减少构造、不加锁。TaskMeta是从ResourcePool分配出来的,在进程运行的时候,不会释放TaskMeta的吧。那么一旦使用了KeyTable,TaskMeta就会绑定一个KeyTable,跟bthread_keytable_pool_t机制是不是有点兼容问题?例如一个TaskMeta已经绑定一个KeyTable,但是bthread_attr_t设置bthread_keytable_pool_t,这时候还需要额外的状态来记录KeyTable的来源用于处理归还逻辑吧。 是不是用ObjectPool来分配KeyTable就能规避锁的影响,实现还简单?
> 是否应该将cputime_ns / 1000000000.0;更改为 cputime_ns / (real_elapse_time);其中real_elapse_time是这个函数两次调用的时间差。 I think this formula is correct and cannot be modified in this way. The unit of cputime_ns in the formula is ns, and...
> I agree that accurately computing `bthread_worker_usage` within the bthread framework is quite challenging, especially since some tasks may run for extended periods without yielding. Rather than striving for exact...
加上`namespace logging`试试: ```c++ namespace logging { DECLARE_int32(v); } ```