Sebastien ESTIENNE wrote: > [...]
Normaly i use pthreads (i'm developping and linux and then port it on mac/win), but i was told my mozilla dev on #developers that i can't use threads directly in firefox extensions. But i must "proxy on the main thread" (that was really an enigm for me).
So i look for docs about it and found that i need to use this: http://www.mozilla.org/projects/xpcom/Proxies.html i even found some example using it in mozilla source code and in this: http://lxr.mozilla.org/seamonkey/source/xpcom/proxy/tests/proxytests.cpp
But i really can't figure how to use it to solve my problem, i tried many things, but it didn't work.
I'm quite new to mozilla dev (3days). I understand how to call c++ function from javascript and get the result using xpcom xpidl etc...
But i really can't figure how to start my little thread, and i'm stuck with it...
Use NS_NewThread() from nsIThread.idl to create the new thread when your extension first starts. Then you can use the XPCOM proxies to send events to that thread's nsIEventQueue (which you may need to create manually) for communication between the threads.
Dan
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
