Commit 62fa992
committed
Disallow pending interrupts to be checked during FiberScheduler#unblock
Ractors can send signals at any time, so the previous debug assertion
can fail if a Ractor sends a signal.
```ruby
require 'async/scheduler'
scheduler = Async::Scheduler.new
Fiber.set_scheduler(scheduler)
Signal.trap(:INT) do
end
q = Thread::Queue.new
Thread.new do
loop do
Ractor.new do
Process.kill(:INT, $$)
end.value
end
end
Fiber.schedule do
Fiber.schedule do
1.upto(1000000) do |i|
sleep 0.01
q.pop
q.push(1)
puts "1 iter push/pop"
end
end
Fiber.schedule do
1.upto(1000000) do |i|
sleep 0.01
q.push(i)
q.pop
puts "1 iter push/pop#2"
end
end
end
```1 parent 7dd9c76 commit 62fa992
2 files changed
+35
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15019 | 15019 | | |
15020 | 15020 | | |
15021 | 15021 | | |
| 15022 | + | |
15022 | 15023 | | |
15023 | 15024 | | |
15024 | 15025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
647 | 648 | | |
648 | 649 | | |
649 | 650 | | |
| 651 | + | |
| 652 | + | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
653 | 656 | | |
654 | | - | |
655 | 657 | | |
656 | | - | |
657 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
658 | 664 | | |
659 | | - | |
| 665 | + | |
660 | 666 | | |
661 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
662 | 674 | | |
663 | 675 | | |
664 | 676 | | |
| |||
1079 | 1091 | | |
1080 | 1092 | | |
1081 | 1093 | | |
1082 | | - | |
1083 | | - | |
| 1094 | + | |
| 1095 | + | |
1084 | 1096 | | |
1085 | | - | |
1086 | | - | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1087 | 1103 | | |
1088 | | - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1089 | 1107 | | |
1090 | | - | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1091 | 1114 | | |
1092 | 1115 | | |
1093 | 1116 | | |
| |||
0 commit comments