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

Function inplace_push_thread

test/bthread_execution_queue_unittest.cpp:579–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void* inplace_push_thread(void* arg) {
580 bthread::ExecutionQueueId<LongIntTask> id = { (uint64_t)arg };
581 int thread_id = num_threads.fetch_add(1, butil::memory_order_relaxed);
582 LOG(INFO) << "Start thread" << thread_id;
583 for (int i = 0; i < 100000; ++i) {
584 bthread::execution_queue_execute(id, ((long)thread_id << 32) | i,
585 &bthread::TASK_OPTIONS_INPLACE);
586 }
587 return NULL;
588}
589
590void test_inplace_and_order(bool use_pthread) {
591 memset(next_task, 0, sizeof(next_task));

Callers

nothing calls this directly

Calls 2

execution_queue_executeFunction · 0.85
fetch_addMethod · 0.80

Tested by

no test coverage detected