Hi,

I was wondering if there's a way to attach any function to any worker that 
Emscripten create. I want to do that because I want to add an event 
listener to all of my threads.

What I would like to do:


   - I want to be able to add a function in my shell.html (Let's call it 
   *onNewWorker*)
   - And when emscripten create a Worker because of a pthread in my 
   project, *onNewWorker *is called with my worker passed in argument
   - So since inside of my *onNewWorker *function, I can add event listener 
   with my worker, all my pthread have the event listener that I want
   

I want to do this because I need to add an event listener for when my C++ 
thread send message with EM_ASM*. This is needed because I want to send a 
message from my thread to the main thread that trigger an 
`alert('message')` since we can't use alert() from workers.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to