MCPcopy Create free account
hub / github.com/Tencent/phxqueue / UpdateProcUsed

Method UpdateProcUsed

phxqueue/consumer/hblock.cpp:540–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540void HeartBeatLock::UpdateProcUsed() {
541 int proc_used = 0;
542 for (int vpid{0}; vpid < impl_->nproc; ++vpid) {
543 Queue_t *queue{&impl_->buf->queues[vpid]};
544 if (LOCK_ITEM_MAGIC == queue->magic) {
545 ++proc_used;
546 }
547 }
548 impl_->proc_used = proc_used;
549}
550
551
552comm::RetCode HeartBeatLock::Sync() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected