Second thread working at slow speed

Chase Wilson
2010-07-07T22:42:31Z

I have program that does a bunch of file processing and the GUI froze up
every time I ran it. I decided to do the trick of running my main code
in a second thread and using the timer to update the gui every 100 ms.
However, the problem is that the second thread that I run is working but
very very slowly. Much slower than how it normally works.

I have the timer:
      timer = Timer.new(self,ID_ANY)
      evt_timer(timer.id) {Thread.pass}
      timer.start(1000)

my second thread:
newthread = Thread.new do
        create_prompt_data
        create_groups
        create_xls
      end
--
Posted via http://www.ruby-forum.com/.