Skip to content

Commit e0a871e

Browse files
authored
Fix: Fiber::ExecutionContext::Parallel::Scheduler#tick must be unsigned (#16155)
The tick is expected to overflow, at which point it will reach the negative `Int32::MIN` and the once in a while check to dequeue from the global queue won't happen until we reach a positive value!
1 parent 56c8826 commit e0a871e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fiber/execution_context/parallel/scheduler.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module Fiber::ExecutionContext
2525
@runnables : Runnables(256)
2626
@event_loop : Crystal::EventLoop
2727

28-
@tick : Int32 = 0
28+
@tick : UInt32 = 0
2929
@spinning = false
3030
@waiting = false
3131
@parked = false

0 commit comments

Comments
 (0)