I have come across a code where they needed an infinite loop & they used
GMainLoop *mainloop = NULL;
mainloop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (mainloop);
I have doubt why don't they use while(true);
for same purpose. What does GMainLoop internally do, Ain't it will be same internally. How does GMainLoop
enhances the performance.