<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/did_you_mean/test_ractor_compatibility.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/did_you_mean] Revert "Alias value to take in old Ruby"</title>
<updated>2025-06-04T06:14:27+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-04T05:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f4913db97d2262c8ffc4244ca0a39349ff62b23'/>
<id>1f4913db97d2262c8ffc4244ca0a39349ff62b23</id>
<content type='text'>
This reverts commit https://github.com/ruby/did_you_mean/commit/15d7b0bfa573.

https://github.com/ruby/did_you_mean/commit/86a7daca19
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit https://github.com/ruby/did_you_mean/commit/15d7b0bfa573.

https://github.com/ruby/did_you_mean/commit/86a7daca19
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/did_you_mean] Alias value to take in old Ruby</title>
<updated>2025-06-03T08:24:03+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-03T06:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0266e4def2efc809cccac19b4cc985d270bc0201'/>
<id>0266e4def2efc809cccac19b4cc985d270bc0201</id>
<content type='text'>
https://github.com/ruby/did_you_mean/commit/15d7b0bfa5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/did_you_mean/commit/15d7b0bfa5
</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>Manually merged https://github.com/ruby/did_you_mean/pull/177</title>
<updated>2022-06-07T06:24:48+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-06-07T06:24:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=11b9dd8ccb26a091b99230640494540ad0cc4e48'/>
<id>11b9dd8ccb26a091b99230640494540ad0cc4e48</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite with assert_ractor for multiple ractor environment</title>
<updated>2022-05-20T10:48:28+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-05-20T10:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4146fd284b3c3995cf6638b239625c530c6da875'/>
<id>4146fd284b3c3995cf6638b239625c530c6da875</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Picked the missing test file from https://github.com/ruby/did_you_mean/commit/8faba54b2d3ec9aa570691775f143801308c5b2f</title>
<updated>2022-05-20T09:53:16+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-05-20T09:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6649797ee8cc15330c2c050ba33d09859048996'/>
<id>b6649797ee8cc15330c2c050ba33d09859048996</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove test that activates Ractor unexpectedly</title>
<updated>2021-12-23T00:43:39+00:00</updated>
<author>
<name>Yuki Nishijima</name>
<email>yk.nishijima@gmail.com</email>
</author>
<published>2021-12-23T00:43:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=feaf4fbc3fa16382fbd07158c448c7b5bdae78b5'/>
<id>feaf4fbc3fa16382fbd07158c448c7b5bdae78b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>* gems/default_gems: Sync did_you_mean</title>
<updated>2021-12-22T11:29:18+00:00</updated>
<author>
<name>Yuki Nishijima</name>
<email>yk.nishijima@gmail.com</email>
</author>
<published>2021-12-22T11:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac4e0978ee4358430396403065eabe1aca05784f'/>
<id>ac4e0978ee4358430396403065eabe1aca05784f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert commits for did_you_mean</title>
<updated>2021-12-21T13:10:03+00:00</updated>
<author>
<name>Yuki Nishijima</name>
<email>yk.nishijima@gmail.com</email>
</author>
<published>2021-12-21T13:09:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cdb7d699d0641e8f081d590d06d07887ac09961f'/>
<id>cdb7d699d0641e8f081d590d06d07887ac09961f</id>
<content type='text'>
This reverts commit 4560091b1c99ab33db0d653b9dd2d977fe4676d5.
This reverts commit a6f76122a2395bd914daa0aa04fb5a6ce4e0c045.
This reverts commit e59b18a6379c55f15ccda85c27d6997d44ef5293.
This reverts commit 505dfae05d56d844ea150676edb87850a406d071.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4560091b1c99ab33db0d653b9dd2d977fe4676d5.
This reverts commit a6f76122a2395bd914daa0aa04fb5a6ce4e0c045.
This reverts commit e59b18a6379c55f15ccda85c27d6997d44ef5293.
This reverts commit 505dfae05d56d844ea150676edb87850a406d071.
</pre>
</div>
</content>
</entry>
<entry>
<title>* gems/default_gems: Fix CI builds</title>
<updated>2021-12-21T11:03:47+00:00</updated>
<author>
<name>Yuki Nishijima</name>
<email>yk.nishijima@gmail.com</email>
</author>
<published>2021-12-21T11:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a6f76122a2395bd914daa0aa04fb5a6ce4e0c045'/>
<id>a6f76122a2395bd914daa0aa04fb5a6ce4e0c045</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
