From: Alex Fenton Date: 2005-12-07T23:52:35+09:00 Subject: Re: wxruby and threads See below - note it doesn't really matter where you create the thread - it could be passed into the App's constructor. It's just in on_init for simplicity. a require 'thread' require 'wx' class MinimalApp < Wx::App def on_idle @thread.run() end def on_init @thread = Thread.new do loop { puts 'HELLO' STDOUT.flush sleep 1 } end evt_idle { on_idle } f = Wx::Frame.new( nil, -1,'Test' ) f.show end end MinimalApp.new().main_loop