My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
OWorkQueue  
Overview of OWorkQueue
Updated May 13, 2010 by matr...@mac.com

OWorkQueue

Provides a queue of jobs that will be executed in a particular order, at a particular interval.

Methods

Constructor

var workQ = new OWorkQueue( key, interval );

workQ The variable that will hold your work queue.
key A string with a unique key for this work queue. This will become the key for the OInterval.
interval Number of milliseconds to wait after the completion of the previous job.

push

(see OQueue) Adds a job to the work queue (see Job Objects below).

start

Starts working. Jobs are taken from the queue and executed.

Properties

working

Boolean containing whether the work queue is currently working or not.

Events

onWorking

Called when the queue has started working.

onIdle

Called when the queue has finished working.

Data structures

Job object

A job object is a POJO that represents a single job. Any object that has an execute function is a valid job object.

{
  execute: function(){
    // do work
  }
}

Sign in to add a comment
Powered by Google Project Hosting