Hi, see Glib MainLoop for the MainLoop documentation. Documentation is sparse, but essentially, it waits until the Glib eventloop is idle, before running the sub, so as not to interfere with it. It is seen used more when you try to use Glib or Gtk2 code from a thread. If you get into GUI's, you will often read about the thread safety of the GUI toolkit. Gtk2's thread safety is accomplished principally by only using Glib::Idle->add to access the main gui code from within the thread. Here are a couple of examples.
| [reply] [d/l] [select] |
Thanks a lot for all the suggestions and examples. I am going start with your simpler example above first ( looks more familiar style and easier for me ) but see if I will spot some thread safe is needed for the real run... this is a really nice alternative resort! Thanks again, Cheers! =)
| [reply] |