Re: calls to select seem to mess with NSTimers..
Re: calls to select seem to mess with NSTimers..
- Subject: Re: calls to select seem to mess with NSTimers..
- From: Douglas Davidson <email@hidden>
- Date: Fri, 26 Oct 2001 14:22:28 -0700
On Friday, October 26, 2001, at 01:51 PM, Charles Bennett wrote:
Hi All, I been tracking down an odd situation where a NSTimer seemed to
be
keeping "bad" time.
NSTimers can fire only when the run loop has control. If you do not
return control to the run loop for some period of time--whether you are
blocked in a system call like select(), or whether you are simply
performing some long-running bit of processing--then no timers will fire
during that period, nor will any events arrive, or any other run
loop-based activity.
You can perform the select() in another thread, or you can use
NSFileHandle's background reading facilities, or you could potentially
use CFSocket.
Douglas Davidson