cgserver 6.4.4 → 6.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,9 +34,9 @@ class AsyncQueueItem {
34
34
  class AsyncQueueTool {
35
35
  //队列数据,一个key队列必须有先后
36
36
  _queues;
37
- add(key, func) {
37
+ async add(key, func, thisArg = null, ...params) {
38
38
  this._queues[key] = this._queues[key] || new AsyncQueueItem(key);
39
- this._queues[key].add(func);
39
+ await this._queues[key].add(func);
40
40
  }
41
41
  }
42
42
  exports.GAsyncQueueTool = new AsyncQueueTool();
@@ -15,7 +15,7 @@ declare class AsyncQueueTool {
15
15
  protected _queues: {
16
16
  [key: string]: AsyncQueueItem;
17
17
  };
18
- add(key: string, func: Function): void;
18
+ add(key: string, func: Function, thisArg?: any, ...params: any[]): Promise<void>;
19
19
  }
20
20
  export declare let GAsyncQueueTool: AsyncQueueTool;
21
21
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "6.4.4",
3
+ "version": "6.4.5",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",