MCPcopy Create free account
hub / github.com/apache/brpc / NotifyOnStopped

Method NotifyOnStopped

src/brpc/progressive_attachment.cpp:241–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void ProgressiveAttachment::NotifyOnStopped(google::protobuf::Closure* done) {
242 if (done == NULL) {
243 LOG(ERROR) << "Param[done] is NULL";
244 return;
245 }
246 if (_notify_id != INVALID_BTHREAD_ID) {
247 LOG(ERROR) << "NotifyOnStopped() can only be called once";
248 return done->Run();
249 }
250 if (_httpsock == NULL) {
251 return done->Run();
252 }
253 const int rc = bthread_id_create(&_notify_id, done, RunOnFailed);
254 if (rc) {
255 LOG(ERROR) << "Fail to create _notify_id: " << berror(rc);
256 return done->Run();
257 }
258 _httpsock->NotifyOnFailed(_notify_id);
259}
260
261} // namespace brpc

Callers

nothing calls this directly

Calls 4

bthread_id_createFunction · 0.85
berrorFunction · 0.85
NotifyOnFailedMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected