How do you refresh the tk gui while doing some computation inside of a button call back routine?
The routine takes a long time, and the user wants to see some progress.
Need some way to repaint the screen / look for the cancel button.
in gtk its like this:
/* computation going on */
...
while (gtk_events_pending ())
gtk_main_iteration ();
...
/* computation continued */
I might be missing the point, but why would’t you use thread for that? You won’t be able to join it in a callback, but you still should be able to generate an event.
doing the heavy things in your callback is considered a bad practice since it blocks the entire event loop so your gui freezes.