Skip to content

Commit ee0b8e2

Browse files
authored
fix(subscriber): fix self wakes count (#430)
Self-wakes were not being detected and displayed in the console. The `burn` task in the `app` example - which deliberately has many self-wakes - was not registering any. It appears that a logic error was present in the self-wake counting in `console-subscriber` since it was added in #238. When a self wake was detected, the `wakes` count was incremented a second time (the `wakes` count is incremented for all wakes before checking for a self wake), instead of increamenting the `self_wakes` count. This PR fixes the logic so that when a self wake is detected, the `self_wakes` count is incremented.
1 parent ee71e22 commit ee0b8e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console-subscriber/src/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl TaskStats {
217217

218218
self.wakes.fetch_add(1, Release);
219219
if self_wake {
220-
self.wakes.fetch_add(1, Release);
220+
self.self_wakes.fetch_add(1, Release);
221221
}
222222

223223
self.make_dirty();

0 commit comments

Comments
 (0)