I don't think I do either... I didn't even know there was something like app.YieldToNextThread... Anyway, I do now... Thanks I'll use that. @Joe Huber I don't know about the bug... It has some similar stuff, but that thread doesn't start until the mouse moves.. Mine does, it just runs a bit slow until the app starts using a lot off CPU, cause then the thread gets more to... It might be related, but I don't know what the other bug is caused by, so I don't know if it's the same/related.
Anyway, thanks all... Maarten On 06 Aug 2006 12:35:16 -0700, Daniel L. Taylor <[EMAIL PROTECTED]> wrote:
> I don't know either... But I managed to fix my issue :-D Not on a very > safe > way though.. I think... I added a timer with period 0 and making it call " > app.DoEvents 0". I know app.DoEvents is evil in a GUI ap, but I really > don't > think I have a choice.. Anyway, every spare time my app gets now, the next > waiting thread is executed.. according to the language reference.. > > "Specifying zero milliseconds causes the next waiting thread to execute. A > negative value specifies no sleep. The default is -1. " > > I just wanne know, is this safe or should I search for another solution? Perhaps App.YieldToNextThread would be safer than App.DoEvents in your timer. I would try that and if it works probably not worry about it further. I do know from testing that if you give a preemptive thread a high enough priority it will take essentially all of the CPU time, but everything else will slow to a crawl unless you have a dual core system. If you've got a really CPU intensive task and you need nearly all the CPU time, you could put the task in a preemptive thread. I offer a toolkit for preemptive threads on my web site. I don't think you need this solution in this case, but if you do.... Daniel L. Taylor Taylor Design Computer Consulting & Software Development [EMAIL PROTECTED] www.taylor-design.com _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
