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/library
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
..
abbrev
base64
bigdecimal 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
bigmath
cgi Update to ruby/spec@335eb9b 2020-08-28 20:26:02 +02:00
cmath/math
conditionvariable Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
coverage Update to ruby/spec@9277d27 2020-09-30 12:21:48 +02:00
csv Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
date Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
datetime
delegate Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
digest Update to ruby/spec@9277d27 2020-09-30 12:21:48 +02:00
drb
English Warn non-nil $\ [Feature #14240] 2020-02-23 13:37:40 +09:00
erb Use https instead of http 2020-07-28 19:51:54 +09:00
etc Removed obsolete names 2020-04-03 01:16:57 +09:00
expect
fiber relax Fiber#transfer's restriction 2020-10-12 22:58:41 +09:00
find
getoptlong Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
ipaddr Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
logger Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
matrix Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
mkmf
monitor
net Update to ruby/spec@bfd843a 2020-09-30 13:43:19 +02:00
objectspace Update to ruby/spec@4e486fa 2020-05-31 18:22:49 +02:00
observer
open3
openssl Avoid deprecated OpenSSL::Digest constants 2020-06-29 13:25:32 +09:00
openstruct [ruby/ostruct] Fix dup/clone 2020-09-14 16:10:37 -04:00
optionparser
pathname Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
pp
prime
rbconfig Update to ruby/spec@335eb9b 2020-08-28 20:26:02 +02:00
readline
resolv
rexml 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
ripper Update to ruby/spec@07164da 2020-07-27 21:41:08 +02:00
rubygems/gem
scanf
securerandom
set Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
shellwords
singleton
socket Make the test suite pass on real Android/Termux environment 2020-10-12 21:26:05 +09:00
stringio 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
stringscanner
syslog Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
tempfile Revert the related commits about Tempfile.open change. 2020-09-09 21:10:48 +09:00
thread
time
timeout Update to ruby/spec@b6b7752 2020-06-27 15:51:37 +02:00
tmpdir/dir
uri
weakref Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
win32ole Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00
yaml [ruby/ostruct] Improved YAML serialization. 2020-09-30 18:11:24 -04:00
zlib Update to ruby/spec@032ee74 2020-05-03 12:28:29 +02:00