Skip to content

Commit

Permalink
MT: math overflow after spawning Int32::MAX + 1 fibers (#14096)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden authored Dec 17, 2023
1 parent 3d9bc38 commit 756a876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crystal/scheduler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Crystal::Scheduler

protected def find_target_thread
if workers = @@workers
@rr_target += 1
@rr_target &+= 1
workers[@rr_target % workers.size]
else
Thread.current
Expand Down

0 comments on commit 756a876

Please sign in to comment.