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

Function add

test/bthread_execution_queue_unittest.cpp:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46};
47
48int add(void* meta, bthread::TaskIterator<LongIntTask> &iter) {
49 stopped = iter.is_queue_stopped();
50 int64_t* result = (int64_t*)meta;
51 for (; iter; ++iter) {
52 *result += iter->value;
53 if (iter->event) { iter->event->signal(); }
54 }
55 return 0;
56}
57
58void test_single_thread(bool use_pthread) {
59 int64_t result = 0;

Callers

nothing calls this directly

Calls 3

is_queue_stoppedMethod · 0.80
signalMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected