question
> I meant to try to understand the difference between using NS_IMPL_ISUPPORTS1
> and NS_IMPL_THREADSAFE_ISUPPORTS1. currently I use initialy
> NS_IMPL_ISUPPORTS1, and only when an assertion ocoures I change it to the
> thread safe version. Do I simply waste my time and should always use
> NS_IMPL_THREADSAFE_ISUPPORTS1 ?


You should use NS_IMPL_ISUPPORTS* for objects that are only accessed on one thread. You should use NS_IMPL_THREADSAFE_ISUPPORTS* for objects that will be accessed on multiple threads. If you are getting assertions, you are either accessing the object on a "bad" thread or you need to implement the object in a thread-safe manner.

--BDS


Reply via email to