When using a message box as follows, the messages appear to only be written after the task (written in C++) finishes. Any hints on how to flush the messages written to the message box so the user becomes aware that the parent task is still executing, versus stuck in some permanent loop.
iwidgets::messagebox $Frame.mb -hscrollmode dynamic -labeltext "" \
-labelpos n -visibleitems 90x2 -labelpos w
iwidgets::messagebox $Frame.mb -hscrollmode dynamic -labeltext "" \
-labelpos n -visibleitems 90x2 -labelpos w