[Greasemonkey] Re: Problems with 0.5.1
Aaron Boodman
zboogs at gmail.com
Thu Sep 1 12:44:42 EDT 2005
On 9/1/05, Nikolas Coukouma <lists at atrus.org> wrote:
> The core of this is sort of like saying that single processor systems
> can't have race conditions. There's obviously a scheduler that switches
> between rendering, JS, etc. Perhaps you've talked to someone who knows
> how that works in Firefox (JS runs for a set time before yielding,
> statements/functions are atomic, and so on), but I certainly don't know.
> I know the spec doesn't promise anything. The most notable thing that
> suggests preemption is max_script_run_time.
Well I guess neither of us really know what we're talking about --
maybe I shouldn't have been so final sounding.
I got this information from Darin Fisher, from a presentation he gave
where I work. I found the slides, but it wasn't in there -- it was in
the questions afterward. I found this informadtion with a Google
search:
http://www.mozilla.org/xpapps/threads.html
"The current plan for 5.0 for all major platforms (Windows, Mac, Unix)
is to have one UI thread and one or more netlib threads. Processing
that occurs in the UI thread includes, parsing, Creation of Content
model, layout, DOM activity, incremental & resize reflows, UI event
loop, callbacks and plugins. The netlib threads are responsible only
for network activities. All the major platforms use NSPR module to
create the threads. There are 2 things about using NSPR to create and
manage threads that should not be confused."
It's a little out of date, but similar to what Darin said. It also
strongly correlates with my experience, which suggests that events are
queued in the javascript interpreter and run when execution of the
current event is complete.
But what do I know.
--
Aaron
More information about the Greasemonkey
mailing list