Project

General

Profile

Actions

Bug #17482

closed

Ractor.receive doesnt accept Ctrl+C under some condition

Added by riskwa (riskwa anon) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
[ruby-dev:50984]

Description

When I run this script, Ctrl+C doesn't work.
Waiting forever on #4 is fine, but I think Ctrl+C should work.

r = Ractor.new() {
  # sleep 1                  #1
  File.open(__FILE__){  }    #2
}

# sleep 1                    #3
p Ractor.receive             #4

When I comment out #2, Ctrl+C works.
When I comment in #1 and/or #3, Ctrl+C works.
In my environment, it's reproducable in 100%.

My environment is:
WSL2 ubuntu 5 4.19.128-microsoft-standard #1 i5-10400 6core

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0