MCPcopy Create free account
hub / github.com/baidu/babylon / bthread_queue_consume

Function bthread_queue_consume

example/use-execution-queue/example.cpp:38–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38int bthread_queue_consume(void*, ::bthread::TaskIterator<Task>& iter) {
39 if (iter.is_queue_stopped()) {
40 return 0;
41 }
42 for (; iter; ++iter) {
43 latency << ::butil::monotonic_time_ns() - iter->begin;
44 pending << -1;
45 }
46 return 0;
47}
48
49void babylon_queue_consume(
50 ::babylon::ConcurrentExecutionQueue<Task>::Iterator iter,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected