Procházet zdrojové kódy

squash: rename private vars in AsyncQueue

dev1
paweldomas před 6 roky
rodič
revize
fc1633b88f
1 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 5
    5
      modules/util/AsyncQueue.js

+ 5
- 5
modules/util/AsyncQueue.js Zobrazit soubor

@@ -8,8 +8,8 @@ export default class AsyncQueue {
8 8
      * Creates new instance.
9 9
      */
10 10
     constructor() {
11
-        this.modificationQueue = async.queue(this._processQueueTasks.bind(this), 1);
12
-        this.stopped = false;
11
+        this._queue = async.queue(this._processQueueTasks.bind(this), 1);
12
+        this._stopped = false;
13 13
     }
14 14
 
15 15
     /**
@@ -37,12 +37,12 @@ export default class AsyncQueue {
37 37
      * @param {function} [callback] - Optional callback to be called after the task has been executed.
38 38
      */
39 39
     push(workFunction, callback) {
40
-        if (this.stopped) {
40
+        if (this._stopped) {
41 41
             callback && callback('The queue has been stopped');
42 42
 
43 43
             return;
44 44
         }
45
-        this.modificationQueue.push(workFunction, callback);
45
+        this._queue.push(workFunction, callback);
46 46
     }
47 47
 
48 48
     /**
@@ -50,6 +50,6 @@ export default class AsyncQueue {
50 50
      * after the queue has been shutdown then the callback will be called with an error.
51 51
      */
52 52
     shutdown() {
53
-        this.stopped = true;
53
+        this._stopped = true;
54 54
     }
55 55
 }

Načítá se…
Zrušit
Uložit