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

Class ExitException

src/bthread/task_group.h:37–49  ·  view source on GitHub ↗

For exiting a bthread.

Source from the content-addressed store, hash-verified

35
36// For exiting a bthread.
37class ExitException : public std::exception {
38public:
39 explicit ExitException(void* value) : _value(value) {}
40 ~ExitException() throw() {}
41 const char* what() const throw() override {
42 return "ExitException";
43 }
44 void* value() const {
45 return _value;
46 }
47private:
48 void* _value;
49};
50
51// Refer to https://rigtorp.se/isatomic/, On the modern CPU microarchitectures
52// (Skylake and Zen 2) AVX/AVX2 128b/256b aligned loads and stores are atomic

Callers 1

bthread_exitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected