R
RgeeK
From my newbie perspective I understand that Javascript is a single
threaded environment and so interrupt-driven events are going to be
somewhat challenging.
But, I have an issue which seems to be to be a collision between a
periodic drawing event (based on "setInterval") and a periodic http
request based on the "xmlHttpRequest.onreadystatechange" listener.
I assume my interval timeout, and the operations associated with that
occasionally make me miss my http reply.
Two questions
a) given that one of these (the receive) is more important to me than
the other (the setInterval) can I set priorities in some way?
b) is there some other good method for handling such interrupt
collisions? I'm hoping to avoid the whole process of associating
receives with the requests that spawned them, and doing re-transmission
requests etc, A time-out is prudent no doubt, but I'd like to give my
receives a fighting chance.
Thanks for any thoughts...
Ross.
threaded environment and so interrupt-driven events are going to be
somewhat challenging.
But, I have an issue which seems to be to be a collision between a
periodic drawing event (based on "setInterval") and a periodic http
request based on the "xmlHttpRequest.onreadystatechange" listener.
I assume my interval timeout, and the operations associated with that
occasionally make me miss my http reply.
Two questions
a) given that one of these (the receive) is more important to me than
the other (the setInterval) can I set priorities in some way?
b) is there some other good method for handling such interrupt
collisions? I'm hoping to avoid the whole process of associating
receives with the requests that spawned them, and doing re-transmission
requests etc, A time-out is prudent no doubt, but I'd like to give my
receives a fighting chance.
Thanks for any thoughts...
Ross.