View previous topic :: View next topic |
Author |
Message |
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Apr 21, 2008 4:25 am Post subject: 100% CPU usage |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Apr 21, 2008 5:13 am Post subject: Re: 100% CPU usage |
|
|
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 |
|
|
|
|
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
|