How to make sure messages printed with printf() show up timely?

Posted By: panz

How to make sure messages printed with printf() show up timely? - 08/18/16 20:02

When I ran a script with many loops in main() for data exporting, the printf() statements inside the loop were not able to show anything more beyond the first message, and the Zorro window appeared frozen.

It seems in this case Zorro did not use a separate thread for the GUI to keep it responsive when the main Zorro thread was busy.

Is there a way I can avoid this problem and show message/progress properly then? Maybe a method to flush standard io? It seems when a script is doing a back test Zorro is able to handle progress showing properly - is that the difference between using main() and run()?

Thanks!
Posted By: jcl

Re: How to make sure messages printed with printf() show up timely? - 08/22/16 08:32

The wait() function flushes the io.
© 2024 lite-C Forums