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

Class IdResetter

src/bthread/id.cpp:303–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301typedef ListOfABAFreeId<bthread_id_t, IdTraits> IdList;
302
303struct IdResetter {
304 explicit IdResetter(int ec, const std::string& et)
305 : _error_code(ec), _error_text(et) {}
306 void operator()(bthread_id_t & id) const {
307 bthread_id_error2_verbose(
308 id, _error_code, _error_text, __FILE__ ":" BAIDU_SYMBOLSTR(__LINE__));
309 id = INVALID_BTHREAD_ID;
310 }
311private:
312 int _error_code;
313 const std::string& _error_text;
314};
315
316size_t get_sizes(const bthread_id_list_t* list, size_t* cnt, size_t n) {
317 if (list->impl == NULL) {

Callers 1

bthread_id_list_reset2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected