@cornerstonejs/core 1.70.11 → 1.70.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "1.70.11",
3
+ "version": "1.70.13",
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": "134a4a19a878fc7d0615403046bc74ed8564ada0"
50
+ "gitHead": "cab8855c6d09eb5f1175eaf1259dd430812ad55a"
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) => {