Re: How does gmainloop schedule GSources by priority?



Hi,

On Wed, Aug 11, 2010 at 10:02 PM, cee1 <fykcee1 gmail com> wrote:
> So if I have a IOChannel watch source with a high priority, and then attach
> an idle source, the idle source will have no change to be scheduled?

An idle source will never be scheduled while any higher-priority
source is ready. (that's why it's called "idle" it runs when the loop
is idle - not doing anything else. though really it's somewhat of a
misnomer because really an idle source is a "run immediately and
always source" that happens to default to a low priority; you can set
a higher priority on it and then it won't wait for idleness.)

Anyway you are correct, the main loop does not do any fancy scheduling
where it allocates time slices. Higher priorities simply always win.

Havoc


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]