/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_util_TaskRunner({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.TaskMgr"],"extends":null,"uses":[],"html":"
Subclasses
Files
Provides the ability to execute one or more arbitrary tasks in a multithreaded\nmanner. Generally, you can use the singleton Ext.TaskMgr instead, but\nif needed, you can create separate instances of TaskRunner. Any number of\nseparate tasks can be started at any time and will run independently of each\nother. Example usage:
\n\n// Start a simple clock task that updates a div once per second\nvar updateClock = function(){\n Ext.fly('clock').update(new Date().format('g:i:s A'));\n} \nvar task = {\n run: updateClock,\n interval: 1000 //1 second\n}\nvar runner = new Ext.util.TaskRunner();\nrunner.start(task);\n\n// equivalent using TaskMgr\nExt.TaskMgr.start({\n run: updateClock,\n interval: 1000\n});\n\n
\n\n\nSee the start method for details about how to configure a task object.
\n\n\nAlso see Ext.util.DelayedTask.
\nThe minimum precision in milliseconds supported by this TaskRunner instance\n(defaults to 10)
\nStarts a new task.
\nA config object that supports the following properties:
run
: FunctionThe function to execute each time the task is invoked. The\nfunction will be called at each interval and passed the args
argument if specified, and the\ncurrent invocation count if not.
If a particular scope (this
reference) is required, be sure to specify it using the scope
argument.
Return false
from this function to terminate the task.
interval
: Numberargs
: Arrayrun
. If not specified, the current invocation count is passed.scope
: Objectrun
function. Defaults to the task config object.duration
: Numberrepeat
: NumberBefore each invocation, Ext injects the property taskRunCount
into the task object so\nthat calculations based on the repeat count can be performed.
The task
\nStops an existing running task.
\nThe task to stop
\nThe task
\nStops all tasks that are currently running.
\n