<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/io/wait, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/io-wait] Remove `IO#nread` and `IO#ready?</title>
<updated>2025-11-12T13:48:18+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-04T12:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b70f5afb68253eb25cf5f8f2fdfbf01dae1d05d3'/>
<id>b70f5afb68253eb25cf5f8f2fdfbf01dae1d05d3</id>
<content type='text'>
https://github.com/ruby/io-wait/commit/1decadc7f9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/io-wait/commit/1decadc7f9
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #21625] Allow io/wait methods with `IO#ungetc` in text mode</title>
<updated>2025-10-29T08:23:00+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-28T12:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=12350eb9e0d3317da57b5a37c0c2810946b48850'/>
<id>12350eb9e0d3317da57b5a37c0c2810946b48850</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test_io_wait.rb: Increase a timeout for a flaky test</title>
<updated>2025-09-02T23:21:08+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-09-02T23:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=de6df7508de397138e3a4d16469e7f35a8fe1b1e'/>
<id>de6df7508de397138e3a4d16469e7f35a8fe1b1e</id>
<content type='text'>
like 68682a5d2b2

https://github.com/ruby/ruby/actions/runs/17417763247/job/49449895757?pr=14433
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
like 68682a5d2b2

https://github.com/ruby/ruby/actions/runs/17417763247/job/49449895757?pr=14433
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase timeout for failing tests</title>
<updated>2025-08-14T18:23:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-08-14T16:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68682a5d2b277569d7402b737b16d76a2870e414'/>
<id>68682a5d2b277569d7402b737b16d76a2870e414</id>
<content type='text'>
https://github.com/ruby/ruby/actions/runs/16969921157/job/48103809963
https://github.com/ruby/ruby/actions/runs/16969655024/job/48102876839
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/ruby/actions/runs/16969921157/job/48103809963
https://github.com/ruby/ruby/actions/runs/16969655024/job/48102876839
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/io-wait] Alias value or join to take in old Ruby</title>
<updated>2025-06-03T08:24:14+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-03T07:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6609ba05141a8e95e4c0b7db2579d85b1e35d074'/>
<id>6609ba05141a8e95e4c0b7db2579d85b1e35d074</id>
<content type='text'>
https://github.com/ruby/io-wait/commit/cf84aea70d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/io-wait/commit/cf84aea70d
</pre>
</div>
</content>
</entry>
<entry>
<title>`Ractor::Port`</title>
<updated>2025-05-30T19:01:33+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-05-26T18:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ef2bb61018cd9ccb5b61a3d91911e04a773da4a7'/>
<id>ef2bb61018cd9ccb5b61a3d91911e04a773da4a7</id>
<content type='text'>
* Added `Ractor::Port`
  * `Ractor::Port#receive` (support multi-threads)
  * `Rcator::Port#close`
  * `Ractor::Port#closed?`
* Added some methods
  * `Ractor#join`
  * `Ractor#value`
  * `Ractor#monitor`
  * `Ractor#unmonitor`
* Removed some methods
  * `Ractor#take`
  * `Ractor.yield`
* Change the spec
  * `Racotr.select`

You can wait for multiple sequences of messages with `Ractor::Port`.

```ruby
ports = 3.times.map{ Ractor::Port.new }
ports.map.with_index do |port, ri|
  Ractor.new port,ri do |port, ri|
    3.times{|i| port &lt;&lt; "r#{ri}-#{i}"}
  end
end

p ports.each{|port| pp 3.times.map{port.receive}}

```

In this example, we use 3 ports, and 3 Ractors send messages to them respectively.
We can receive a series of messages from each port.

You can use `Ractor#value` to get the last value of a Ractor's block:

```ruby
result = Ractor.new do
  heavy_task()
end.value
```

You can wait for the termination of a Ractor with `Ractor#join` like this:

```ruby
Ractor.new do
  some_task()
end.join
```

`#value` and `#join` are similar to `Thread#value` and `Thread#join`.

To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced.

This commit changes `Ractor.select()` method.
It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates.

We removes `Ractor.yield` and `Ractor#take` because:
* `Ractor::Port` supports most of similar use cases in a simpler manner.
* Removing them significantly simplifies the code.

We also change the internal thread scheduler code (thread_pthread.c):
* During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks.
  This lock is released by `rb_ractor_sched_barrier_end()`
  which is called at the end of operations that require the barrier.
* fix potential deadlock issues by checking interrupts just before setting UBF.

https://bugs.ruby-lang.org/issues/21262
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Added `Ractor::Port`
  * `Ractor::Port#receive` (support multi-threads)
  * `Rcator::Port#close`
  * `Ractor::Port#closed?`
* Added some methods
  * `Ractor#join`
  * `Ractor#value`
  * `Ractor#monitor`
  * `Ractor#unmonitor`
* Removed some methods
  * `Ractor#take`
  * `Ractor.yield`
* Change the spec
  * `Racotr.select`

You can wait for multiple sequences of messages with `Ractor::Port`.

```ruby
ports = 3.times.map{ Ractor::Port.new }
ports.map.with_index do |port, ri|
  Ractor.new port,ri do |port, ri|
    3.times{|i| port &lt;&lt; "r#{ri}-#{i}"}
  end
end

p ports.each{|port| pp 3.times.map{port.receive}}

```

In this example, we use 3 ports, and 3 Ractors send messages to them respectively.
We can receive a series of messages from each port.

You can use `Ractor#value` to get the last value of a Ractor's block:

```ruby
result = Ractor.new do
  heavy_task()
end.value
```

You can wait for the termination of a Ractor with `Ractor#join` like this:

```ruby
Ractor.new do
  some_task()
end.join
```

`#value` and `#join` are similar to `Thread#value` and `Thread#join`.

To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced.

This commit changes `Ractor.select()` method.
It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates.

We removes `Ractor.yield` and `Ractor#take` because:
* `Ractor::Port` supports most of similar use cases in a simpler manner.
* Removing them significantly simplifies the code.

We also change the internal thread scheduler code (thread_pthread.c):
* During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks.
  This lock is released by `rb_ractor_sched_barrier_end()`
  which is called at the end of operations that require the barrier.
* fix potential deadlock issues by checking interrupts just before setting UBF.

https://bugs.ruby-lang.org/issues/21262
</pre>
</div>
</content>
</entry>
<entry>
<title>Use EnvUtil.apply_timeout_scale for test_io_wait.rb</title>
<updated>2025-04-30T07:59:16+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-04-30T06:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b4017584b1478c0d3cfe0dbd88c01539db1e071'/>
<id>8b4017584b1478c0d3cfe0dbd88c01539db1e071</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip an unstable test on MinGW</title>
<updated>2023-12-13T17:40:54+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-13T17:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cc86fa8416b571e2d833157b852dee31a0d2f731'/>
<id>cc86fa8416b571e2d833157b852dee31a0d2f731</id>
<content type='text'>
This test fails fairly frequently on MinGW:
https://github.com/ruby/ruby/actions/runs/7195712496/job/19598924253#step:11:168
https://github.com/ruby/ruby/actions/runs/7191246799/job/19585627182#step:11:168

and we aren't actively working on stabilizing tests for MinGW.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test fails fairly frequently on MinGW:
https://github.com/ruby/ruby/actions/runs/7195712496/job/19598924253#step:11:168
https://github.com/ruby/ruby/actions/runs/7191246799/job/19585627182#step:11:168

and we aren't actively working on stabilizing tests for MinGW.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove `require 'io/wait'` where it's no longer necessary. (#6932)</title>
<updated>2022-12-14T22:37:01+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-12-14T22:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d20bd06a97555a4493458d866590107da6cb21f4'/>
<id>d20bd06a97555a4493458d866590107da6cb21f4</id>
<content type='text'>
* Remove `require 'io/wait'` as it's part of core now.

* Update ruby specs using version gates.

* Add note about why it's conditional.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove `require 'io/wait'` as it's part of core now.

* Update ruby specs using version gates.

* Add note about why it's conditional.</pre>
</div>
</content>
</entry>
<entry>
<title>Skip test_wait on MinGW CI</title>
<updated>2022-09-17T13:08:36+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-09-17T13:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1825d3673f2a5504b65ba31a9fb6c2e52edf1fc3'/>
<id>1825d3673f2a5504b65ba31a9fb6c2e52edf1fc3</id>
<content type='text'>
This test has been unstable, and it seems like we're not interested in
fixing that for MinGW.
https://github.com/ruby/ruby/actions/runs/3073317191/jobs/4965373284
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test has been unstable, and it seems like we're not interested in
fixing that for MinGW.
https://github.com/ruby/ruby/actions/runs/3073317191/jobs/4965373284
</pre>
</div>
</content>
</entry>
</feed>
