Skip to content

Commit c7bbe48

Browse files
authored
Use wrapping add on ticks to avoid tick counter overflow in debug builds (#101)
1 parent 7592d41 commit c7bbe48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ impl Runner<'_> {
853853
.await;
854854

855855
// Bump the tick counter.
856-
self.ticks += 1;
856+
self.ticks = self.ticks.wrapping_add(1);
857857

858858
if self.ticks % 64 == 0 {
859859
// Steal tasks from the global queue to ensure fair task scheduling.

0 commit comments

Comments
 (0)