On 2013-01-28 7:11 PM, Brian Smith wrote:
[+taras]
Kyle Huey wrote:
2. Because NSS reads and writes to files in the profile directory,
the profile directory must be readable and writable up until process
exit. The current rules for XPCOM shutdown say that services must
stop doing disk I/O well before then; we would need to change the
rules. It is safe to do so?
This is almost certainly incompatible with the perf team's plans to
shutdown via exit(0).
My understanding is that the perf team wants to prevent things from writing
during shutdown so that they become confident that it is safe to shut down
early.
But, AFAICT, it is OK to do I/O during shutdown as long as you don't care
whether you get interrupted or not.
If by that you mean as long as you don't care whether all of your writes
actually go to disk and are prepared to deal with half-finished writes
the next time that NSS starts up, then yes.
Now, one question is whether it is safe to let an exit(0) on the main thread
interrupt an NSS database write that happens off the main thread. That's
something I will look into.
exit(0) kills all of the process's threads, so it doesn't make much of a
difference which thread is performing the writes.
Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform