On 13/07/2018 21:37, Kris Maglione wrote:
tl;dr: A major change to the architecture preference service has just
landed, so please be on the lookout for regressions.
We've been working for the last few weeks on rearchitecting the
preference service to work better in our current and future
multi-process configurations, and those changes have just landed in bug
1471025.
Looks like a great step forward!
While we're thinking about the prefs service, is there any possibility
we could enable off-main-thread access to preferences?
I am aware that in simple cases, this can be achieved via the
StaticPrefsList; by defining a VARCACHE_PREF there, I can read its value
from other threads. But this doesn't help in my use case, where I need
another thread to be able to query an extensible set of pref names that
are not fully known at compile time.
Currently, it looks like to do this, I'll have to iterate over the
relevant prefs branch(es) ahead of time (on the main thread) and copy
all the entries to some other place that is then available to my worker
threads. For my use case, at least, the other threads only need read
access; modifying prefs could still be limited to the main thread.
Possible? Or would the overhead of locking be too crippling?
JK
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform