multithreadingpluginsbrowsermodelnpapi

Browser main thread from the NPAPI plugin


I am developing an NPAPI plugin and I need to run some code from browser's main thread.

What is the threading model for NPAPI plugins? What is the default thread from which NPAPI executes? How can I run my code from the browser's main thread?


Solution

  • The threading model is that browser will call your plugin in the main thread, and you must call NPN_* methods from the main thread.