UPD: OTOH, without resuming, the code doesn't see any problem at all (despite the claim about killing other thread's fibers):
fibers=[]Thread.new{f=Fiber.new{(1..).each{sleep(0.1)}}fibers<<f}sleep(0.1)# to make sure the thread have startedpfibers.last.kill#=> #<Fiber:0x00007f73f682c078 examples/fiber_kill.rb:7 (terminated)>
"attempt to resume a resumed fiber ( double resume )"
I am not sure what "double resume" means here. But, even aside
from this, I could not even try to want to explain what "to
resume a resumed fiber" really means. Perhaps something else
was meant here? Or it was meant to convey that the code tried
to resume an already-resumed fiber. Either way it is indeed
peculiar.
I'd even be radical and suggest to get rid of fibers and instead
put everything under Thread, but I guess that is not possible
for various reasons. To me Threads seem easier to understand
than Fibers though.