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

Function check_order

test/bthread_execution_queue_unittest.cpp:425–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425int check_order(void* meta, bthread::TaskIterator<LongIntTask>& iter) {
426 for (; iter; ++iter) {
427 long value = iter->value;
428 int thread_id = value >> 32;
429 long task = value & 0xFFFFFFFFul;
430 if (task != next_task[thread_id]++) {
431 EXPECT_TRUE(false) << "task=" << task << " thread_id=" << thread_id;
432 ++*(long*)meta;
433 }
434 if (iter->event) { iter->event->signal(); }
435 }
436 return 0;
437}
438
439void test_multi_threaded_order(bool use_pthread) {
440 memset(next_task, 0, sizeof(next_task));

Callers

nothing calls this directly

Calls 1

signalMethod · 0.80

Tested by

no test coverage detected