1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

getactorstats query for validator-engine-console

This commit is contained in:
birydrad 2024-09-03 11:24:59 +02:00
parent e55c132178
commit 420029b056
39 changed files with 1223 additions and 51 deletions

View file

@ -115,6 +115,22 @@ class StealingQueue {
std::atomic_thread_fence(std::memory_order_seq_cst);
}
size_t size() const {
while (true) {
auto head = head_.load();
auto tail = tail_.load(std::memory_order_acquire);
if (tail < head) {
continue;
}
size_t n = tail - head;
if (n > N) {
continue;
}
return n;
}
}
private:
std::atomic<td::int64> head_{0};
std::atomic<td::int64> tail_{0};