diff --git a/src/mutex.cr b/src/mutex.cr index 13d0f49f65a4..50e3dedad23b 100644 --- a/src/mutex.cr +++ b/src/mutex.cr @@ -21,3 +21,10 @@ alias Mutex = Sync::Mutex # WARNING: `Mutex::Protection` is deprecated as of Crystal 1.20. Use `Sync::Type` instead. alias Mutex::Protection = Sync::Type + +class Sync::Mutex + # :nodoc: + def self.new(*, protection : ::Mutex::Protection) + new(type: protection) + end +end