mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Additional instrumentation around global counter events.
This commit is contained in:
1 parent
bf48c7b1b4
commit
00f11a9e8f
2 files changed
+5
-1
No files matched your search
@@ -150,7 +150,7 @@ impl<F: Fn(u64) -> Result + Sync> State<F> {
|
||||
.remove(index)
|
||||
.expect("sequence number at index must be removed");
|
||||
|
||||
debug_assert!(removed == id, "sequence number removed must match id");
|
||||
debug_assert_eq!(removed, id, "sequence number removed must match id");
|
||||
|
||||
// release only occurs when the oldest value retires
|
||||
if index != 0 {
|
||||
@@ -160,6 +160,8 @@ impl<F: Fn(u64) -> Result + Sync> State<F> {
|
||||
// release occurs for the maximum retired value
|
||||
let release = if self.pending.is_empty() { self.dispatched } else { id };
|
||||
|
||||
debug_assert!(release >= id, "sequence number released must not be less than id");
|
||||
|
||||
(self.release)(release).expect("release callback should not error");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user