Created
January 17, 2025 14:32
-
-
Save dontpaniclabsgists/5d7480c05f51bb7c5a38a98e45a3c2bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadWithPromiseLockNoDataCheck = async (key: string): Promise<boolean> => { | |
this.log(key + 'Calling loadWithPromiseLock No Data Check'); | |
const random = Math.random(); | |
this.log(key + 'Random: ' + random); | |
// Create a new loading promise | |
return (async () => { | |
this.log(key + '***START*** Loading data'); | |
await this.slowApiCall(key); | |
this.promiseDataMap.set(key, 'data + ' + random); | |
this.log(key + '***END*** Data loaded'); | |
return true; | |
})(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment