Mete Ciragan wrote:
I'm writing a Mozilla plugin with the Gecko SDK. It's rendering terrain and pages tiles of the terrain in a separate thread. Now I've read in the test file (which does not compile) http://lxr.mozilla.org/mozilla/source/netwerk/test/TestThreadedIO.cpp that threaded IO won't work. Is it really not possible to download files from another thread than the main thread? I tried blocking/synchronous and non-blocking/asynchronous downloads. And they fail either in nsIEventQueueService::GetThreadEventQueue or nsIChannel::Open. Both return 0 when called from the main thread and 0x80040111 (NS_ERROR_NOT_AVAILABLE, Returned when an operation can't complete due to an unavailable resource).

It is correct: the networking code is designed to be used only from the main thread. It uses a worker thread model so that the main thread is never blocked.

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

Reply via email to