Re: Is this a bug I see before my eyes?
Mark Grandau <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
See http://msdn.microsoft.com/en-us/library/xs8w4454(VS.80).aspx It's basically a one shot that you've entered an Idle state for all the OnIdle handlers. If you want your handler to keep running, you can peek the message queue at the end of our handler and run again. Though this may starve out other OnIdle handlers. I would run the background thread and set its thread priority to THREAD_PRIORITY_IDLE. On 6/30/10, Alain Rist <[email protected]> wrote: > What's new from http://tech.groups.yahoo.com/group/wtl/message/13288 ? > cheers, > AR > > From: Rob Marsden > Sent: Wednesday, June 30, 2010 9:55 PM > To: [email protected] > Subject: [wtl] Is this a bug I see before my eyes? > > > > Well, I can't believe it, if is, because in it's in such a core piece of > code. I an using an OnIdle() callback to do background processing. This > is called from OnIdle(int nIdleCount) around line 1036 in atlapp.h v8.1 > Which says: > > // override to change idle processing > virtual BOOL OnIdle(int /*nIdleCount*/) > { > for(int i = 0; i < m_aIdleHandler.GetSize(); i++) > { > CIdleHandler* pIdleHandler = m_aIdleHandler[i]; > if(pIdleHandler != NULL) > pIdleHandler->OnIdle(); > } > return FALSE; // don't continue > } > > Can any one tell me why the return value is discarded, preventing any > OnIdle function requesting 'MoreToDo'? > > Or am I missing something fundamental? > > -- > Rob Marsden > Gistix (Northern) Limited > > > > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/