mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 23:41:42 +00:00
Update task.js
This commit is contained in:
parent
d33854a89f
commit
8e713a0d30
10
lib/task.js
10
lib/task.js
|
@ -5,9 +5,13 @@
|
|||
/* // example:
|
||||
* // var TASK = require("lib/task");
|
||||
* // var taskQueue = TASK.createTaskQueue();
|
||||
* // TASK.putTask(queue, function() { console.log('123'); }, [1, 2, 3])
|
||||
* // .then(TASK.createTask(function() { console.log('456'); }, [4, 5, 6]))
|
||||
* // .then(TASK.createTask(function() { TASK.stop(); console.log('789'); }, [7, 8, 9]))
|
||||
* // TASK.putTask(queue, function() { console.log('123'); sleep(100); }, [1, 2, 3])
|
||||
* // .then(TASK.createTask(function() { console.log('456'); sleep(200); }, [4, 5, 6]))
|
||||
* // .then(TASK.createTask(function() { TASK.stop(); console.log('789'); sleep(300); }, [7, 8, 9]))
|
||||
* // ;
|
||||
* // TASK.putTask(queue, function() { console.log('321'); sleep(100); }, [3, 2, 1)
|
||||
* // .then(TASK.createTask(function() { console.log('654'); sleep(200); }, [6, 5, 4]))
|
||||
* // .then(TASK.createTask(function() { TASK.stop(); console.log('987'); sleep(300); }, [9, 8, 7]))
|
||||
* // ;
|
||||
* // taskQueue.run();
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user