On 7/19/12 4:04 PM, Jason Duell wrote:
nsITimer.idl says nothing about thread safety. (Can we add some?)
From a glance at the code, it appears that it's safe to Cancel and
null-out an nsITimer from any given thread, so long as the timer
callback that's pointed to has thread-safe refcounting. Correct?
If I recall correctly, it's "unsafe" to fire an nsITimer on any thread
other than the main thread. At least insofar as it will cause races on
the timers' delay adjustment mechanism.... It won't crash, but can
cause timer firing times to get all weird.
(Note that it's not _intended_ that this be unsafe; it's just
implemented in an unsafe way.)
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform