Re: Keeping OT app responsive
Re: Keeping OT app responsive
- Subject: Re: Keeping OT app responsive
- From: Quinn <email@hidden>
- Date: Thu, 26 Feb 2004 17:52:21 +0000
At 10:16 -0700 26/2/04, Thomas E. Knowlton, Jr. wrote:
Which leads to my next question: will an OTTimerTask that runs at
deferred task time reliably preempt a notifier function that runs at
deferred task time?
No.
Or will the time manager give me that kind of preemption? Or...? :)
Probably. However, I'd recommend against this approach. If your
notifier is sitting in a loop doing work and testing a "time to quit"
flag that's set by the timer task, you might as well eliminate the
timer task and just have the notifier check the current time and
leave if it's been running too long. The OT time stamps functions
are fast. Better yet, use UpTime to get the current timestamp and
pre-calculate the AbsoluteTimer value for your timeout. This makes
the timeout check very simple: call UpTime and see if the result is
bigger than your timeout.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.