diff options
author | crupest <crupest@outlook.com> | 2020-08-08 18:06:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-08 18:06:35 +0800 |
commit | 9d421cf555774e437f156347c0502170f475c544 (patch) | |
tree | 53a46f82b6a24afe795071a8d54847bf7d2d036a /Timeline/ClientApp/src/app/data/queue.ts | |
parent | 8b8290701b665dbe6ad1742a5691e4838bbbb997 (diff) | |
download | timeline-9d421cf555774e437f156347c0502170f475c544.tar.gz timeline-9d421cf555774e437f156347c0502170f475c544.tar.bz2 timeline-9d421cf555774e437f156347c0502170f475c544.zip |
Remove queue.
Diffstat (limited to 'Timeline/ClientApp/src/app/data/queue.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/data/queue.ts | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Timeline/ClientApp/src/app/data/queue.ts b/Timeline/ClientApp/src/app/data/queue.ts deleted file mode 100644 index 001340a9..00000000 --- a/Timeline/ClientApp/src/app/data/queue.ts +++ /dev/null @@ -1,14 +0,0 @@ -const queueMap = new Map<string, Promise<null>>();
-
-export function queue<T>(key: string, func: () => Promise<T>): Promise<T> {
- const last = queueMap.get(key);
- if (last == null) {
- const promise = func();
- queueMap.set(key, promise.then(null, null));
- return promise;
- } else {
- const promise = last.then(() => func());
- queueMap.set(key, promise.then(null, null));
- return promise;
- }
-}
|