Jon Smirl wrote:
I'm still not 100% clear on what is happening with threading. If I was
building this from scratch I would use a single thread. Everything
would be event driven like lighttpd and polipo. WIth Mozilla/XPCOM it
seems to be a mix of both threads and events.
What is confusing is the nsIServerSocketListener object. It lives on
the UI thread but its events are coming on the socket thread. I
couldn't figure out how to make the nsIServerSocketListener object
live on the socket thread and get rid of the proxy object.
The design of necko is that threads are an implementation detail. For
channels and server sockets, the idea is that all callbacks happen on
the thread that called asyncOpen/asyncListen. That means that in the
implementation threads and events are used, but these are transparent to
the caller.
_______________________________________________
dev-tech-network mailing list
dev-tech-network@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-network