Class MBX.Queue
Defined in: queue.js.
Constructor Attributes | Constructor Name and Description |
---|---|
A function queue that will only execute at *most* every interval miliseconds.
|
Method Attributes | Method Name and Description |
---|---|
add(func)
adds a function to the queue
|
|
fires and removes the next pending function in the queue
|
|
returns but does not remove the next function in the queue
|
|
remove(func)
removes the function that is passed in from the queue
|
|
start()
start the queue back up - the queue is NOT started at creation time
|
|
stop()
stop the queue
|
Class Detail
MBX.Queue()
A function queue that will only execute at *most* every interval miliseconds.
myQueue = MBX.Queue.create({ interval: 500 }); myQueue.add(function () { //do something 'spensive });
Method Detail
add(func)
adds a function to the queue
- Parameters:
- func
fireNextFunction()
fires and removes the next pending function in the queue
nextFunction()
returns but does not remove the next function in the queue
remove(func)
removes the function that is passed in from the queue
- Parameters:
- func
{MBX.Queue#instance}
start()
start the queue back up - the queue is NOT started at creation time
- Returns:
- {MBX.Queue#instance} the queue
{MBX.Queue#instance}
stop()
stop the queue
- Returns:
- {MBX.Queue#instance} the queue