Benjamin, Thank you so much for your answer. However, it is not clear to me how it would work out for me. The question is how would I get to execute my code in the main thread? For example (again, this is not what I am trying to do, but just an example to illustrate) if I want to periodically clean all the cache in the background, withou user interaction, I would say create a thread that calls nsICacheService's method to do that. But how would I get to make that call in the main thread?
Any pointer is appreciated. On Apr 12, 6:22 am, Benjamin Smedberg <[email protected]> wrote: > On 4/12/10 3:49 AM, [email protected] wrote: > > > My question is, how would I ensure my calls are > >threadsafe? DoesXPCOMguarantee that I can > > call theXPCOMinterface functions from anythread > > and internallyFirefoxwill ensure the > >threadsafety? > > No. Most Mozilla interfaces are *not*threadsafe, and you should only call > them from the mainthread. Why are you trying to use threads? > > --BDS _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
