From: Eric Wong Date: 2014-11-24T21:05:30+00:00 Subject: [ruby-core:66441] Re: [ruby-trunk - Bug #10540] [Open] Yielded fibers do not execute ensure blocks This seems unfortunate. I'm not sure if there's a good way to do this automatically with current APIs because Fibers require explicit scheduling. Perhaps storing Fibers in Thread.current and having a terminate_all_fibers method can be helpful: Thread.new do begin do_something_which_creates_fibers ensure # all thread-local fibers are resumed until they're dead terminate_all_fibers end end