[mythtv] Mythweather not download weather radar map.

Bruce Markey bjm at lvcm.com
Sun May 25 23:35:19 EDT 2003


Matt Zimmerman wrote:
>>Bruce Markey wrote:
>>
>>>When a process sleeps, it relinquishes the CPU. After the
>>>timeout, the process becomes runable in the run queue and
>>>the process scheduler can run it in a future time slice. This
>>>is usually 10000-20000usec later. A small usleep says let
>>>something else run but check back with me as soon as possible.
>>>So even though it says 50 the average delay should be more
>>>like 15000usec.
>>
> 
> That is what sched_yield is for, but it does not guarantee that there will
> be any delay at all if nothing else wants to run.  usleep forces a delay of
> at least the time specified.

Thanks, I can see where sched_yield would be very useful.

AFAIK, for a single threaded process, sleep and usleep
will relinquish the CPU. However, nanosleep can hold the
processor for sleeps less than 2msec. I believe multi-
threaded processes keep using the time slice as long as any
thread is runable so a thread in usleep could return right
after the timeout. Other than that, it always seems to be
at least 10000usec.

--  bjm








More information about the mythtv-dev mailing list