@simplysm/sd-core-common
Advanced tools
Comparing version 12.5.22 to 12.5.23
export declare class FunctionQueue { | ||
private readonly _delay?; | ||
private readonly _gap?; | ||
private readonly _queue; | ||
private _isQueueRunning; | ||
constructor(_delay?: number | undefined); | ||
constructor(_gap?: number | undefined); | ||
run(fn: () => void | Promise<void>): void; | ||
runLast(fn: () => void | Promise<void>): void; | ||
} |
import { Wait } from "./Wait"; | ||
export class FunctionQueue { | ||
constructor(_delay) { | ||
this._delay = _delay; | ||
constructor(_gap) { | ||
this._gap = _gap; | ||
this._queue = []; | ||
@@ -19,4 +19,4 @@ this._isQueueRunning = false; | ||
await runningFn(); | ||
if (this._delay !== undefined && this._delay > 0) { | ||
await Wait.time(this._delay); | ||
if (this._gap !== undefined && this._gap > 0) { | ||
await Wait.time(this._gap); | ||
} | ||
@@ -39,4 +39,4 @@ } | ||
await runningFn(); | ||
if (this._delay !== undefined && this._delay > 0) { | ||
await Wait.time(this._delay); | ||
if (this._gap !== undefined && this._gap > 0) { | ||
await Wait.time(this._gap); | ||
} | ||
@@ -43,0 +43,0 @@ } |
{ | ||
"name": "@simplysm/sd-core-common", | ||
"version": "12.5.22", | ||
"version": "12.5.23", | ||
"description": "심플리즘 패키지 - 코어 모듈 (common)", | ||
@@ -5,0 +5,0 @@ "author": "김석래", |
@@ -7,3 +7,3 @@ import {Wait} from "./Wait"; | ||
public constructor(private readonly _delay?: number) { | ||
public constructor(private readonly _gap?: number) { | ||
} | ||
@@ -21,4 +21,4 @@ | ||
await runningFn(); | ||
if (this._delay !== undefined && this._delay > 0) { | ||
await Wait.time(this._delay); | ||
if (this._gap !== undefined && this._gap > 0) { | ||
await Wait.time(this._gap); | ||
} | ||
@@ -42,4 +42,4 @@ } | ||
await runningFn(); | ||
if (this._delay !== undefined && this._delay > 0) { | ||
await Wait.time(this._delay); | ||
if (this._gap !== undefined && this._gap > 0) { | ||
await Wait.time(this._gap); | ||
} | ||
@@ -46,0 +46,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
298251