Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, dr_panther, degenerate_762, Ayumi), 790 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to make sure messages printed with printf() show up timely? #461739
08/18/16 20:02
08/18/16 20:02
Joined: Jun 2016
Posts: 29
panz Offline OP
Newbie
panz  Offline OP
Newbie

Joined: Jun 2016
Posts: 29
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!

Re: How to make sure messages printed with printf() show up timely? [Re: panz] #461802
08/22/16 08:32
08/22/16 08:32
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The wait() function flushes the io.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1