Why doesn't XtAppProcessEvent keep a Work Process running?
Posted on 2004-10-19
I'm running C/Motif on Unix (Solaris).
I have an app where I call a function which does intensive processing and can run for minutes. This of course locked up the GUI (I'm using XtAppMainLoop). I wanted to avoid any forks to run this lengthy function, so my solution was to embed the following code inside the function such that it got called a few times per second:
while XtAppPending (main_app))
XtAppProcessEvent (main_app, XtIMAll);
This worked great at freeing up the GUI main window. However, it had an unintended side affect. I have a work process running to display the status of the lengthy function. The work process runs OK until the lengthy function is entered, then it freezes until the function is done.
Is there a way to keep this work process running?