Explain about utility class 'Ext.util.TaskRunner'?

Provides the ability to execute one or more arbitrary tasks in a asynchronous manner. Generally, you can use the singleton Ext.TaskManager instead, but if needed, you can create separate instances of TaskRunner. Any number of separate tasks can be started at any time and will run independently of each other.
Example usage:
 // Start a simple clock task that updates a div once per second
 var updateClock = function () {
     Ext.fly('clock').update(new Date().format('g:i:s A'));
 }
 var runner = new Ext.util.TaskRunner();
 var task = runner.start({
     run: updateClock,
     interval: 1000
 }
The equivalent using TaskManager:
 var task = Ext.TaskManager.start({
     run: updateClock,
     interval: 1000
 });

Comments

Popular posts from this blog

How to start and stop editing a record?