Skip to content

Commit

Permalink
Use unstable_sort_by!
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Dec 1, 2022
1 parent 3485b66 commit 2c1d955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/channel.cr
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class Channel(T)
# This is to avoid deadlocks between concurrent `select` calls
ops_locks = ops
.to_a
.sort_by!(&.lock_object_id)
.unstable_sort_by!(&.lock_object_id)

each_skip_duplicates(ops_locks, &.lock)

Expand Down

0 comments on commit 2c1d955

Please sign in to comment.