Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Wait for a delayed function to end to start another...
- From: mdougherty at pbp.com (Mike Dougherty)
- Subject: [Javascript] Wait for a delayed function to end to start another...
- Date: Wed Jan 24 12:55:16 2007
wouldn't the concurrent calls only be a problem if the target were the same object? So if there is no need for the semaphore to block two different objects, the global variable you mentioned could be a property value set on the object itself. With that strategy, the delayed functions could check their respective objects' semaphore and either cancel self, or cancel pending action and replace with self. This allows two different objects to have delayed actions without interfering with each other. (though I question the value of an intentially delayed user experience, but that's another issue) On Wed, 24 Jan 2007 11:46:38 -0700 "Peter Brunone" <peter@xxxxxxxxxxx> wrote: > > What about another global variable that flips before when you call setTimeout, and resets when >the function actually runs?
- References:
- [Javascript] Wait for a delayed function to end to start another...
- From: Peter Brunone
- [Javascript] Wait for a delayed function to end to start another...
- Prev by Date: [Javascript] Wait for a delayed function to end to start another...
- Next by Date: [Javascript] Scroller
- Previous by thread: [Javascript] Wait for a delayed function to end to start another...
- Next by thread: [Javascript] Scroller
- Index(es):