>From: "Mike Wilson" <wmwilson01 / hotmail.com> >Reply-To: ruby-talk / ruby-lang.org >To: ruby-talk / ruby-lang.org (ruby-talk ML) >Subject: Bus Error with tk app >Date: Thu, 4 Mar 2004 01:58:40 +0900 > >I have a (horribly written) tk app which used to work just fine. I >recently added threading to it, and it now works fine for some period of >time, but then crashses leaving only: > >->8-->8-- >/usr/local/lib/ruby/1.8/tk.rb:1623: [BUG] Bus Error >ruby 1.8.1 (2003-12-25) [sparc-solaris2.8] > >Abort >->8-->8-- > >The recently modified code is this: ><code> > >threads = [] >check_status = proc { > threads.clear > $labels.each_key do |aHost| > threads << Thread.new(aHost) do |host| > if $look[host] == 1 > if system("ping #{host} 4 > /dev/null 2>&1") > ...snip... > else > ...snip... > end > end > end > end > updater.configure('text' => "Last update: " + >Time.new.strftime(DATE_FORMAT + ":%S")) > Tk.after(tknm_interval, &check_status) >} >check_status.call >threads.each do |t| t.join end >Tk.mainloop() > ></code> > >Am I doing something wrong here? > Is this a bug? _________________________________________________________________ Frustrated with dial-up? Lightning-fast Internet access for as low as $29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/