@spinajs/threading 2.0.394 → 2.0.396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,kBAMrC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAU,CAAC,EAAE,MAAM,MAAM,EAAE,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,kBAgChF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,MAAM,MAAM,EAAE,UAAU,MAAM,CAAC,EAAE,IAAI,MAAM,kBAIvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,UAAU,MAAM,EAAE,UAAU,MAAM,CAAC,eAiB3D,CAAC"}
|
package/lib/cjs/mutex.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Mutex = void 0;
|
|
4
|
+
exports.mutex_create = mutex_create;
|
|
5
|
+
exports.mutex_get = mutex_get;
|
|
6
|
+
exports.mutex_wait = mutex_wait;
|
|
7
|
+
exports.mutex_delete = mutex_delete;
|
|
8
|
+
exports.mutex_acquire = mutex_acquire;
|
|
9
|
+
exports.mutex_release = mutex_release;
|
|
4
10
|
const di_1 = require("@spinajs/di");
|
|
5
11
|
class Mutex {
|
|
6
12
|
}
|
|
@@ -12,7 +18,6 @@ exports.Mutex = Mutex;
|
|
|
12
18
|
function mutex_create(options) {
|
|
13
19
|
return di_1.DI.resolve(Mutex).create(options);
|
|
14
20
|
}
|
|
15
|
-
exports.mutex_create = mutex_create;
|
|
16
21
|
/**
|
|
17
22
|
* Retrieve mutex information if exists
|
|
18
23
|
* @param name
|
|
@@ -20,7 +25,6 @@ exports.mutex_create = mutex_create;
|
|
|
20
25
|
function mutex_get(name) {
|
|
21
26
|
return di_1.DI.resolve(Mutex).get(name);
|
|
22
27
|
}
|
|
23
|
-
exports.mutex_get = mutex_get;
|
|
24
28
|
/**
|
|
25
29
|
*
|
|
26
30
|
* Waits for mutex until released. I timeout is provided returns false after timeout
|
|
@@ -32,7 +36,6 @@ exports.mutex_get = mutex_get;
|
|
|
32
36
|
function mutex_wait(name, timeout) {
|
|
33
37
|
return di_1.DI.resolve(Mutex).wait(name, timeout);
|
|
34
38
|
}
|
|
35
|
-
exports.mutex_wait = mutex_wait;
|
|
36
39
|
/**
|
|
37
40
|
* Deletes mutex if its not locked
|
|
38
41
|
* @param name
|
|
@@ -41,7 +44,6 @@ exports.mutex_wait = mutex_wait;
|
|
|
41
44
|
function mutex_delete(options) {
|
|
42
45
|
return di_1.DI.resolve(Mutex).delete(options);
|
|
43
46
|
}
|
|
44
|
-
exports.mutex_delete = mutex_delete;
|
|
45
47
|
/**
|
|
46
48
|
* Acquire mutex. If not exists, creates it
|
|
47
49
|
* @param options
|
|
@@ -49,7 +51,6 @@ exports.mutex_delete = mutex_delete;
|
|
|
49
51
|
function mutex_acquire(options) {
|
|
50
52
|
return di_1.DI.resolve(Mutex).acquire(options);
|
|
51
53
|
}
|
|
52
|
-
exports.mutex_acquire = mutex_acquire;
|
|
53
54
|
/**
|
|
54
55
|
*
|
|
55
56
|
* Release mutex lock
|
|
@@ -60,5 +61,4 @@ exports.mutex_acquire = mutex_acquire;
|
|
|
60
61
|
function mutex_release(options, deleteOnClose) {
|
|
61
62
|
return di_1.DI.resolve(Mutex).release(options, deleteOnClose);
|
|
62
63
|
}
|
|
63
|
-
exports.mutex_release = mutex_release;
|
|
64
64
|
//# sourceMappingURL=mutex.js.map
|
package/lib/cjs/mutex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutex.js","sourceRoot":"","sources":["../../src/mutex.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mutex.js","sourceRoot":"","sources":["../../src/mutex.ts"],"names":[],"mappings":";;;AA+GA,oCAEC;AAMD,8BAEC;AAUD,gCAEC;AAOD,oCAEC;AAMD,sCAEC;AASD,sCAEC;AAjKD,oCAAiC;AA6DjC,MAAsB,KAAK;CA4C1B;AA5CD,sBA4CC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,OAAyB;IACpD,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,OAAgB;IACvD,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,OAAyB;IACpD,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,OAAyB;IACrD,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,OAA0B,EAAE,aAAuB;IAC/E,OAAO,OAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAC3D,CAAC"}
|
package/lib/mjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,kBAMrC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAU,CAAC,EAAE,MAAM,MAAM,EAAE,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,kBAgChF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,MAAM,MAAM,EAAE,UAAU,MAAM,CAAC,EAAE,IAAI,MAAM,kBAIvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,UAAU,MAAM,EAAE,UAAU,MAAM,CAAC,eAiB3D,CAAC"}
|