Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 18,869 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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


Moderated by  Petra 

Gamestudio download | 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