On Tue, 24 Aug 2010 14:32:03 +0200, m0n0 wrote:

> To me it looks like this needs some clarification (especially the amiga
> comment) O:) 

I must admit it did somewhat confuse me.  The comment is there so I
understood what was going on when I returned to it.

The intention was to get the scheduler to signal as per normal events,
so I could just put a Wait() in and be done with it.  From the
comments, I guess I backed that out because NetSurf needed control
back.  The IntuiTicks thing stops NetSurf busy-waiting, and in fact
stops NetSurf getting past the Wait() if none of its windows are
active (which is friendly enough for user perception, if not for tasks
multitasking in the background whilst using NetSurf - although the
IntuiTicks delay seems to be enough AFAICT).  The only real issue with
how I've implemented it, is that animations stop (and I think page
layout) when the window is deactivated.  Some may consider that a
benefit!

The other thing confusing me was that gui_multitask can't wait for
events, it has to poll (but not run the scheduler).  I assume this
naming came about due to RISC OS' co-operative multitasking - but I'd
still expect NetSurf to do something equivalent to a Wait() to
relinquish control back to the OS, in a function labelled "multitask".

Some proper documentation wouldn't go amiss - in fact, a cleanup of
the two functions so one can wait for events and the other poll, might
be a nice little project for somebody :)

Chris

Reply via email to