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
- pros and cons of using thread safe definitions mark kaplun
- Re: pros and cons of using thread safe definitions Darin Fisher
- Re: pros and cons of using thread safe definiti... mark kaplun
- Re: pros and cons of using thread safe defi... Darin Fisher
- Re: pros and cons of using thread safe defi... Benjamin Smedberg
- Re: pros and cons of using thread safe defi... Axel Hecht
- Re: pros and cons of using thread safe ... mark kaplun
