Fiber ignores ensure clause

Задача #595 была обновлена (Yura Sokolov).

What about this ticket?
Guaranteed ensure inside of Fiber and Fiber.raise (as complement for
Thread.raise) will be usefull for full coroutine based environment ala
python’s gevent.


Bug #595: Fiber ignores ensure clause
https://bugs.ruby-lang.org/issues/595#change-44261

  • Автор: Koichi Sasada
  • Статус: Assigned
  • Приоритет: Normal
  • Назначена: Koichi Sasada
  • Категория: core
  • Версия: Next Major
  • ruby -v: -
  • Backport:

=begin
Ruby プロセス終了時,Fiber が ensure を無視します.
これは,前から直そうと思って手がついていなかった問題です.
10月末までには直そうと思います.結構複雑なので,後回しにしていましました.

fib = Fiber.new{
begin
Fiber.yield :ok
ensure
puts “should be print out”
end
}
p fib.resume
=end

—Файлы--------------------------------
ensure_fiber.patch (2,123 КБ)
ensure_fiber2.patch (7,565 КБ)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs