wudianer
wudianer
> 可以给一个能复现的demo吗 感谢回复 具体场景是客户端http请求下载文件 我们服务接收请求后 调用存储端的sdk读文件并做处理 ``` ctx->AsyncCallWithAttachment([req, callback = std::move(callback), ctx = std::move(ctx)]() mutable { ### // brpc回调: auto lambda = [ctx](char *data, size_t length) -> size_t { if...
> 看起来有点像执行到 ctx->buf.cutn() 这句的时候,ctx已经被析构了, ctx是一个智能指针 auto ctx = std::make_shared(object_size); 并且 如果不用brpc的异步回调处理数据 用同步的方式 也是上述的core的位置
> 有可以运行的例子吗 您的意思是说 要一个源码示例嘛
> > > 有可以运行的例子吗 > > > > > > 您的意思是说 要一个源码示例嘛 > > 对的 代码没有上传到公共仓库 但是与brpc核心的流程就是上面的例子了 还有就是 ctx是一个 sdk的实例 AsyncCallWithAttachment方法内部 ``` > pb::Closure* done = brpc::NewCallback(&ReadObjectWithAttachmentCb, serv_addr,, request, response,...
> Yes, this feature is under development. Please see https://wiki.whamcloud.com/display/PUB/File+Level+Read+Only+Erasure+Coding+-+High+Level+Design for the first phase of EC development. Hi there, thanks so much for the update and sharing the high-level design...