title: Get amount of open fibers in ruby
body: <p>How can I get the current amount of open Fibers in a <code>ruby</code> application? My app uses EventMachine Synchrony lib for concurrency handling. While googling, I've not found any API which would return it.</p>
  
  <p>For example if I have this piece of code:</p>
  
  <pre><code>EM::Synchrony::FiberIterator.new(@outputs, @outputs.size).each do |output|
  # some code goes here
  end
  </code></pre>
  
  <p>then how can I know how many fibers are there running? Without manually using <code>counter++</code> and of course without <code>@some_arr.size</code>.</p>