1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core
Koichi Sasada bf3b2a4374 relax Fiber#transfer's restriction
Using Fiber#transfer with Fiber#resume for a same Fiber is
limited (once Fiber#transfer is called for a fiber, the fiber
can not be resumed more). This restriction was introduced to
protect the resume/yield chain, but we realized that it is too much
to protect the chain. Instead of the current restriction, we
introduce some other protections.

(1) can not transfer to the resuming fiber.
(2) can not transfer to the yielding fiber.
(3) can not resume transferred fiber.
(4) can not yield from not-resumed fiber.

[Bug #17221]

Also at the end of a transferred fiber, it had continued on root fiber.
However, if the root fiber resumed a fiber (and that fiber can resumed
another fiber), this behavior also breaks the resume/yield chain.
So at the end of a transferred fiber, switch to the edge of resume
chain from root fiber.
For example, root fiber resumed f1 and f1 resumed f2, transferred to
f3 and f3 terminated, then continue from the fiber f2 (it was continued
from root fiber without this patch).
2020-10-12 22:58:41 +09:00
..
argf
array Update to ruby/spec@07164da 2020-07-27 21:41:08 +02:00
basicobject
binding 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
builtin_constants
class
comparable
complex Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
data Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
dir
encoding
enumerable
enumerator
env Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
exception Update to ruby/spec@681e8cf 2020-09-30 12:39:20 +02:00
false
fiber relax Fiber#transfer's restriction 2020-10-12 22:58:41 +09:00
file Make the test suite pass on real Android/Termux environment 2020-10-12 21:26:05 +09:00
filetest
float Update to ruby/spec@335eb9b 2020-08-28 20:26:02 +02:00
gc
hash Clarify spec description for Hash#{each,each_pair} 2020-09-28 11:29:15 +02:00
integer Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
io 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
kernel Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
main
marshal Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
matchdata
math
method 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
module Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
mutex 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
nil Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
numeric Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
objectspace Warn on a finalizer that captures the object to be finalized 2020-09-16 13:52:24 -07:00
proc 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
process spec/ruby/core/process/spawn_spec.rb: skip a test on Android 2020-10-01 13:27:32 +09:00
queue
random
range Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
rational
regexp 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
signal
sizedqueue
string Update to ruby/spec@9277d27 2020-09-30 12:21:48 +02:00
struct
symbol Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
systemexit
thread Make Thread#join always convert its argument, as before 70f08f1eed 2020-09-21 16:22:04 +02:00
threadgroup
time 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
tracepoint 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
true Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
unboundmethod
warning Add rb_category_warn{,ing} for warning messages with categories 2020-09-28 08:38:06 -07:00