fix(core): update

This commit is contained in:
Philipp Kunz 2020-05-25 16:22:05 +00:00
parent 52c245d655
commit d6fc173a5b

View File

@ -49,6 +49,11 @@ export class DomTools {
private runOnceTrackerStringMap = new Stringmap(); private runOnceTrackerStringMap = new Stringmap();
private runOnceResultMap = new FastMap(); private runOnceResultMap = new FastMap();
/**
* run a function once and always get the Promise of the first execution
* @param identifierArg
* @param funcArg
*/
public async runOnce<T>(identifierArg: string, funcArg: () => Promise<T>) { public async runOnce<T>(identifierArg: string, funcArg: () => Promise<T>) {
const runningId = `${identifierArg}+runningCheck`; const runningId = `${identifierArg}+runningCheck`;
if(!this.runOnceTrackerStringMap.checkString(identifierArg)) { if(!this.runOnceTrackerStringMap.checkString(identifierArg)) {