require "phi"

form = Phi::Form.new
btn = Phi::Button.new form, :btn , "click to new thread ??"
btn.align = Phi::AL_CLIENT
btn.on_click = proc{
p ThreadGroup::Default.list.size
p Thread.new{
    cnt = 0 unless cnt
    while true
      cnt+= 1
    end
  }
}

form.show
require 'rubyloop'
Phi.mainloop
raise
