UNPKG
@qiniu/miku-delivery-mp-ks
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.0
1.0.0-beta.1
0.0.1-beta.2
0.0.1-beta.1
Kuaishou Mini Program SDK for Miku Delivery
github.com/qbox/miku
qbox/miku
@qiniu/miku-delivery-mp-ks
/
dist
/
utils
/
mutex.d.ts
12 lines
(11 loc)
•
249 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
/** *
@file
Mutex for async processing */
export
default
class
Mutex
{
private
locked;
private
waitings;
constructor
(
);
lock
():
Promise
<
() =>
void
>;
unlock
():
void
; runExclusive<T>(
job
:
() =>
T |
Promise
<T>):
Promise
<T>; }