luliyucoordinate commented on issue #1907: URL: https://github.com/apache/incubator-brpc/issues/1907#issuecomment-1231128605
> done->Run()不保证io结束才返回,这里数据的生命周期是和request_attachment的IOBuf生命周期绑在一起的,不太好确定结束的边界,bthread_local 也不可以。 这里自己/上层管理具体是想怎么管理呢? 我大概能理解你的意思。我是这样理解的,deleter负责在io结束后真正的释放动作。 我有一个需求,如果我的value是一个shared_ptr,那么此时现在的deleter应该是一个ref-1的动作,但是现在的api好像没法实现? 另外我还有一个问题关于fetch和cutn的。对于一个iobuf(这个iobuf实际的意义是一个std::vector<float[]>),我现在需要将每个float[]的片段拿出来,可以通过多次fetch吗,还是说fetch对一个iobuf只能发生一次。fetch得到的内存可以交给shared_ptr管理吗?比如说我的request是一个table的keys和values(table是一个<int64_t, std::shared_ptr<float[]>>类型),当我收到request的时候实际上iobuf已经分配好内存了,此时我能否将iobuf管理的内存交给我的table的shared_ptr管理。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
