From 2c1d955a409eb65fbaabb303950c8387a97c9031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 1 Dec 2022 23:48:23 +0100 Subject: [PATCH] Use `unstable_sort_by!` --- src/channel.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)