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.
Ractor.select
1 parent 8e7f02e commit 2e6f09bCopy full SHA for 2e6f09b
core/ractor.rbs
@@ -363,7 +363,7 @@ class Ractor
363
# -->
364
# TBD
365
#
366
- def self.select: (?) -> untyped
+ def self.select: (?) -> Array[untyped]
367
368
# <!--
369
# rdoc-file=ractor.rb
test/stdlib/Ractor_test.rb
@@ -73,6 +73,18 @@ def test_recv
73
Ractor, :recv
74
end
75
76
+ def test_select
77
+ rs = [
78
+ Ractor.new { sleep 0.1 },
79
+ Ractor.new { sleep 0.1 }
80
+ ]
81
+
82
+ assert_send_type(
83
+ "(::Ractor, ::Ractor) -> ::Array[untyped]",
84
+ Ractor, :select, *rs
85
+ )
86
+ end
87
88
def test_shareable?
89
assert_send_type "(untyped) -> true",
90
Ractor, :shareable?, 42
0 commit comments