FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

100% CPU usage

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Apr 21, 2008 4:25 am    Post subject: 100% CPU usage Reply with quote

Hi,

I get 100% CPU usage when using this version of Application.run

void run(Form mainForm, void delegate() whileIdle)

even if my whileIdle function does nothing. Is this right? That's DFL 0.97.1

thanks,
bobef
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Apr 21, 2008 5:13 am    Post subject: Re: 100% CPU usage Reply with quote

It's working as expected. whileIdle is called while there are no events/messages to process; the default handler calls Application.waitForEvent(). It lets you use it for a game loop, for example.

Perhaps you want the Application.idle event, which is only called when it enters an idle state, not repeatedly while it's idle.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group