I hope someone has done enough GTK programming to be able to help with this:
I'm writing an app for work that includes monitoring if a set of machines is pingable or not. This is a GUI app, written using GTK, so I've got a grid of icons representing each machine and a function that pings them at a regular interval and updates the icon based on whether they are actually up or not. I've assigned a GTK timeout for each machine, that calls a function to ping the machine and update the machine's icon based on its status. All this works fine, except for one little point: when the timeout triggers, it pretty much stops the entire program until the machine is contacted and the icon updated. Then the next timeout triggers (I've got them staggered by a few seconds), and the program stops again. If one function call doesn't respond by the time the next triggers, you get a long queue of backed-up function calls, which just locks up the program even more. What would be the best solution to this problem? I was thinking that I could make the program multithreaded, putting the ping-and-update function into a separate thread for each machine, and then if one machine didn't respond for a while the others wouldn't be affected, and the program as a whole would keep running. Would this be the most efficient solution, or is there a better one? -- Soren Harward [EMAIL PROTECTED] ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list
