@cornerstonejs/core 1.70.11 → 1.70.12
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/dist/cjs/webWorkerManager/webWorkerManager.js +5 -0
- package/dist/cjs/webWorkerManager/webWorkerManager.js.map +1 -1
- package/dist/esm/webWorkerManager/webWorkerManager.js +5 -0
- package/dist/esm/webWorkerManager/webWorkerManager.js.map +1 -1
- package/dist/types/webWorkerManager/webWorkerManager.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/webWorkerManager/webWorkerManager.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.70.
|
|
3
|
+
"version": "1.70.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"type": "individual",
|
|
48
48
|
"url": "https://ohif.org/donate"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "bc9005d6ce0c473de4fc4189c7aa2813658421a3"
|
|
51
51
|
}
|
|
@@ -155,8 +155,11 @@ class CentralizedWorkerManager {
|
|
|
155
155
|
}
|
|
156
156
|
const workerProperties = this.workerRegistry[workerName];
|
|
157
157
|
|
|
158
|
+
workerProperties.processing = true;
|
|
159
|
+
|
|
158
160
|
const results = await api[methodName](args, ...finalCallbacks);
|
|
159
161
|
|
|
162
|
+
workerProperties.processing = false;
|
|
160
163
|
workerProperties.lastActiveTime[index] = Date.now();
|
|
161
164
|
|
|
162
165
|
// If auto termination is enabled and the interval is not set, set it.
|
|
@@ -201,6 +204,11 @@ class CentralizedWorkerManager {
|
|
|
201
204
|
|
|
202
205
|
terminateIdleWorkers(workerName, idleTimeThreshold) {
|
|
203
206
|
const workerProperties = this.workerRegistry[workerName];
|
|
207
|
+
|
|
208
|
+
if (workerProperties.processing) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
|
|
204
212
|
const now = Date.now();
|
|
205
213
|
|
|
206
214
|
workerProperties.instances.forEach((_, index) => {
|