diff --git a/src/channel.cr b/src/channel.cr index 94de1f37a6fa..22593c6a4747 100644 --- a/src/channel.cr +++ b/src/channel.cr @@ -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)