Browse Source

squash: rename workFunction to task

dev1
paweldomas 6 years ago
parent
commit
bdd303109f
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      modules/util/AsyncQueue.js

+ 4
- 4
modules/util/AsyncQueue.js View File

@@ -20,7 +20,7 @@ export default class AsyncQueue {
20 20
     }
21 21
 
22 22
     /**
23
-     * The 'workFunction' function will be given a callback it MUST call with either:
23
+     * The 'task' function will be given a callback it MUST call with either:
24 24
      *  1) No arguments if it was successful or
25 25
      *  2) An error argument if there was an error
26 26
      * If the task wants to process the success or failure of the task, it
@@ -33,16 +33,16 @@ export default class AsyncQueue {
33 33
      *     }
34 34
      * });
35 35
      *
36
-     * @param {function} workFunction - The task to be execute. See the description above.
36
+     * @param {function} task - The task to be executed. See the description above.
37 37
      * @param {function} [callback] - Optional callback to be called after the task has been executed.
38 38
      */
39
-    push(workFunction, callback) {
39
+    push(task, callback) {
40 40
         if (this._stopped) {
41 41
             callback && callback(new Error('The queue has been stopped'));
42 42
 
43 43
             return;
44 44
         }
45
-        this._queue.push(workFunction, callback);
45
+        this._queue.push(task, callback);
46 46
     }
47 47
 
48 48
     /**

Loading…
Cancel
Save