I am very happy with the algorithm
and the principles involved but I might look to improve it a little:
The worker-function should be passed the 2 shifted values, not the array;
I think this
(in this.tbl) is the window
object - I'll have to check this - so I'm creating an unnecessary global;
The limit of 10 is defined twice - it should only be defined once, as a variable. However, as it stands, there can be a different number of requests and needed returns..
I should write the code to handle a failed request. It should clear the timer-interval, but should it also cancel any future requests? Maybe I can supply a true/false argument to determine whether future requests should be cancelled.
I'll report back, but welcome any input