Applet UpCall from JS Event - Which Thread?

Discussion in 'Javascript' started by Richard Maher, Mar 17, 2010.

  1. Hi,

    With many direct references to the second lovely colour diagram on this
    page: -

    I completely understand the hour-glass pause on the single-JS-thread
    preservation architecture when the red arrow for the additional
    "applet-spawned" thread tries to call down when the applet worker thread is
    already calling down. Very clever; love it! Well done all involved.

    What I'd like to know (and I bet my left gonad no one here, including moi,
    has the faintest idea): -

    1) When the additional applet-spawned thread calls down into Javascript and
    that JS calls setTimeout(myFunc,1000) and myFunc eventually [up]Calls back
    into the Applet, which thread will host the call to the applet method?
    Default-Worker or Applet-Spawned? Is the tenuous link/association to a
    round(ish)-trip preserved?

    2) What happens when a single JAVA thread is the target of affection from
    multiple Javascript UpCalls? (The scenario being a) an event upCalls to JAVA
    b) The Applet takes some time before returning c) The single Javascript
    thread is now free to accept further events or down-calls d) a subsequent
    event has triggered another UpCall request e) but the thread is
    busy/occupied with the first)

    Ok, if you don't know, you don't know. If you fancy a half-educated guess
    then that's great as well. Either way please keep the usual "I wouldn't do
    that if I were you" bullshit scowls to yourselves. The best-pratice section
    says "Be as quick as you can" and "always wait an hour before swimming"
    yadda, yadda, yadda. . .

    I am desperately trying to pin down architected behaviour here that is the
    reciprocal of the down-call throttling. Please help if you can.

    Cheers Richard Maher
    Richard Maher, Mar 17, 2010
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Nathan Sokalski
    Mar 11, 2006
  2. Replies:
  3. Richard Maher
    Richard Maher
    Mar 17, 2010
  4. Richard Maher
    Richard Maher
    Nov 17, 2010
  5. Nathan Sokalski

    Determining the Browser and event.keyCode vs. event.which

    Nathan Sokalski, Mar 10, 2006, in forum: ASP .Net Building Controls
    Nathan Sokalski
    Mar 11, 2006

Share This Page