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

Class RValue

test/bthread_execution_queue_unittest.cpp:90–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90class RValue {
91public:
92 RValue() : _value(0) {}
93 explicit RValue(int v) : _value(v) {}
94 RValue(RValue&& rhs) noexcept : _value(rhs._value) {}
95 RValue& operator=(RValue&& rhs) noexcept {
96 if (this != &rhs) {
97 _value = rhs._value;
98 }
99 return *this;
100 }
101
102 DISALLOW_COPY_AND_ASSIGN(RValue);
103
104 int value() const { return _value; }
105
106
107private:
108 int _value;
109};
110
111int add(void* meta, bthread::TaskIterator<RValue> &iter) {
112 stopped = iter.is_queue_stopped();

Callers 1

test_rvalueFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_rvalueFunction · 0.68