Stosh написа:
> On May 7, 5:05 pm, Emil Ivanov <[EMAIL PROTECTED]> wrote:
> Emil,
> For example....  Being able to stack AJAX calls into a queue, so that
> they are either spaced out or simply don't occur at the same time
> would be handy.  In some respects the end-functionality would simulate
> a synchronous call, but wouldn't tie up the browser in the course of
> things.  There are other times where based upon what the user is doing
> I may want to stack a number of requests into a queue and using
> something like executeEach() (or whatever it may be named) to loop
> through each call.
>
> When you brought up your idea for a periodical executor like that, the
> idea crossed my mind.  If this is something that interests you at all,
> let me know we can talk about it some more off-list or something.  To
> be honest...  I'm not even sure the community has a need for a Queue
> plugin?

Actually, today I ran into a problem where ajax request overlapped and
caused strange issues, and I actually tried to find a way to make it
work.

What i tried is adding a flag to the scope (running: false) and
checking in the called function
if (!running) {
 try {
  fn(scope);
  this.running = true;
 }
 finally {
  this.running = false;
 }

but I guess since ajax is executed in a separate thread it doesn't
work. I haven't tested it much, though...

Also, I think this will be very useful feature and it will be a good
plug-in.

Note that I'm not (yet) a js guru...

Regards,
Emil Ivanov

Reply via email to