ttlgreen has asked for the wisdom of the Perl Monks concerning the following question:
I hope I'm not annoying you all with all my newbie questions!
I'm wondering what the best method is for running multiple simultaneus background functions while having a gtk gui to control them would be.
So far I've been using timeouts (because I was having issues with a module I wrote that used threads causing Gtk to spit out very non-helpful errors) and I've noticed the gui seems to lag while the timeout functions are running.
Would threads be a better solution? Might I be failing to do something properly in regards to the timeouts that could be causing this? I've basically been learning how to do this by reading the Gtk2 pods and lots of trial and error. That being said it's very possible the way I'm going about doing this is pretty nasty.
I'd post the code but I don't think any of you would be willing to read something THAT long ;-) and this is more of a programming theory question than a bug hunting problem anyway.
My guess is threads would probably be the better option and I should just use timeouts when necessary to start up the threads that do the actual work.