On Aug 13, 8:10 am, Christian Biesinger <[EMAIL PROTECTED]> wrote:
> Diaa wrote:
> > I'm developing an nsIChannel-derived class as part of a protocol
> > handler, unfortunately I have to use an external synchronous
> > networking library, normally this would be done using threads, so I'm
> > wondering how can I do this, if it is threads, then how to do it, can
> > someone provide me with a little guidance?
>
> Your channel implementation can certainly use threads. You only have to
> make sure that you use your notificationCallbacks, loadgroup, listener
> (this one is the most important), etc. only on the main thread.
>
> nsISupports proxies can help with 
> that:http://www.mozilla.org/projects/xpcom/Proxies.html

Thanks very much for your reply.

Ok, I already started working on it.
Is there any example/sample code that I can use as a guide?
How to use the listener, for example, from the main thread when the
data is actually received in the worker thread?

Thanks again

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to