Packagenet.dmclaren.utils
Classpublic class AsyncProcessor
InheritanceAsyncProcessor Inheritance flash.events.EventDispatcher

Performs processing without blocking execution.



Public Properties
 PropertyDefined by
  processingFunc : Function
The function which does the processing work.
AsyncProcessor
  processingTimeLimit : Number
The maximum amount of time allowed for processing during a single frame.
AsyncProcessor
Protected Properties
 PropertyDefined by
  _processingFunc : Function
AsyncProcessor
  _processingTimeLimit : Number
AsyncProcessor
Public Methods
 MethodDefined by
  
AsyncProcessor(processingFunc:Function = null, processingTimeLimit:Number = 300)
Creates a new asynchronous processor instance.
AsyncProcessor
  
start():void
Starts the asynchronous processing.
AsyncProcessor
Protected Methods
 MethodDefined by
  
Starts the asynchronous processing.
AsyncProcessor
  
Stops the asynchronous processing.
AsyncProcessor
Property detail
_processingFuncproperty
protected var _processingFunc:Function
processingFuncproperty 
processingFunc:Function  [read-write]

The function which does the processing work. It should take no arguments. If processing is complete it must return true, otherwise false. The function will be called multiple times during each frame until the frame's time limit is reached or until it returns true.

Implementation
    public function get processingFunc():Function
    public function set processingFunc(value:Function):void
_processingTimeLimitproperty 
protected var _processingTimeLimit:Number
processingTimeLimitproperty 
processingTimeLimit:Number  [read-write]

The maximum amount of time allowed for processing during a single frame. This value should be kept below the duration of a single frame.

Implementation
    public function get processingTimeLimit():Number
    public function set processingTimeLimit(value:Number):void
Constructor detail
AsyncProcessor()constructor
public function AsyncProcessor(processingFunc:Function = null, processingTimeLimit:Number = 300)

Creates a new asynchronous processor instance.

Parameters
processingFunc:Function (default = null)
 
processingTimeLimit:Number (default = 300)
Method detail
start()method
public function start():void

Starts the asynchronous processing.

startProcessing()method 
protected function startProcessing():void

Starts the asynchronous processing.

stopProcessing()method 
protected function stopProcessing():void

Stops the asynchronous processing.