We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Mutex
1 parent ec4c4ab commit 7a44188Copy full SHA for 7a44188
2 files changed
core/mutex.rbs
@@ -0,0 +1,13 @@
1
+class Mutex
2
+ def initialize: () -> void
3
+
4
+ def lock: () -> self
5
6
+ def unlock: () -> self
7
8
+ def try_lock: () -> bool
9
10
+ def locked?: () -> bool
11
12
+ def owned?: () -> bool
13
+end
test/mutex.rb
+# frozen_string_literal: true
+mutex = Mutex.new
+mutex.lock
+mutex.unlock
+mutex.try_lock
+mutex.locked?
+mutex.owned?
0 commit comments