Javascript / Flash : When exactly are flash external callback methods triggered ?
- by felace
I have a flash application using callbacks to javascript functions (eg. when it receives some data over a socket, it'll call a js script which would change the content of a div according to that given data).
Afaik, there is no actual mutual exclusion in javascript so I'm not sure if I can/need to simulate something like :
callbackFunc() {
lock(mutex1)
foo
unlock(mutex1)
}
...
someOtherFunc() {
lock(mutex1)
bar
unlock(mutex1)
}
So, the question is, when are those callbacks called ? Are they simply queued to be executed right after the browser finishes its task or are they triggered randomly ?