Mete Ciragan wrote:
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).

You can probably fix this specific issue by creating a monitored thread event queue via nsIEventQueueService, but...

Can anyone confirm this, and if not, give an example on how to download files in a thread other than the main thread?

...it is correct that channels are not currently designed to be used on non-main threads, and are not threadsafe. It would be nice to fix that eventually, but, for now they are main thread only. Sorry.



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

Reply via email to