From cd50cf37d997262402c75d378cf3409fcaa734bc Mon Sep 17 00:00:00 2001 From: tufusa Date: Mon, 25 May 2026 22:26:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20`Mutex`=20=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/mutex.rbs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 core/mutex.rbs diff --git a/core/mutex.rbs b/core/mutex.rbs new file mode 100644 index 0000000..4040225 --- /dev/null +++ b/core/mutex.rbs @@ -0,0 +1,13 @@ +class Mutex + def initialize: () -> void + + def lock: () -> self + + def unlock: () -> self + + def try_lock: () -> bool + + def locked?: () -> bool + + def owned?: () -> bool +end From c7fa93cb8194f1c0a7cc86add485625f0e517135 Mon Sep 17 00:00:00 2001 From: tufusa Date: Mon, 25 May 2026 22:26:43 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/mutex.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/mutex.rb diff --git a/test/mutex.rb b/test/mutex.rb new file mode 100644 index 0000000..9ca5d54 --- /dev/null +++ b/test/mutex.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +mutex = Mutex.new + +mutex.lock + +mutex.unlock + +mutex.try_lock + +mutex.locked? + +mutex.owned?