Skip to content

Commit 555164b

Browse files
committed
refactor(@angular-devkit/build-angular): remove piscina minThreads workaround
This is no longer needed since 4.2.0
1 parent 87b197c commit 555164b

File tree

8 files changed

+0
-22
lines changed

8 files changed

+0
-22
lines changed

packages/angular_devkit/build_angular/src/builders/app-shell/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ async function _renderUniversal(
123123
}
124124
}
125125
} finally {
126-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
127-
renderWorker.options.minThreads = 0;
128-
129126
await renderWorker.destroy();
130127
}
131128

packages/angular_devkit/build_angular/src/builders/prerender/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ async function _renderUniversal(
244244
}
245245
}
246246
} finally {
247-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
248-
worker.options.minThreads = 0;
249247
void worker.destroy();
250248
}
251249

packages/angular_devkit/build_angular/src/tools/esbuild/angular/compilation/parallel-compilation.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ export class ParallelCompilation extends AngularCompilation {
135135
}
136136

137137
override close() {
138-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
139-
this.#worker.options.minThreads = 0;
140-
141138
return this.#worker.destroy();
142139
}
143140
}

packages/angular_devkit/build_angular/src/tools/esbuild/i18n-inliner.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ export class I18nInliner {
144144
* @returns A void promise that resolves when closing is complete.
145145
*/
146146
close(): Promise<void> {
147-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
148-
this.#workerPool.options.minThreads = 0;
149-
150147
return this.#workerPool.destroy();
151148
}
152149
}

packages/angular_devkit/build_angular/src/tools/esbuild/javascript-transformer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ export class JavaScriptTransformer {
143143
this.#pendingfileResults?.clear();
144144

145145
if (this.#workerPool) {
146-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
147-
this.#workerPool.options.minThreads = 0;
148-
149146
try {
150147
await this.#workerPool.destroy();
151148
} finally {

packages/angular_devkit/build_angular/src/tools/webpack/plugins/javascript-optimizer-plugin.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ export class JavaScriptOptimizerPlugin {
231231

232232
await Promise.all(tasks);
233233
} finally {
234-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
235-
workerPool.options.minThreads = 0;
236234
void workerPool.destroy();
237235
}
238236

packages/angular_devkit/build_angular/src/utils/action-executor.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ export class BundleActionExecutor {
6565

6666
stop(): void {
6767
if (this.workerPool) {
68-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
69-
this.workerPool.options.minThreads = 0;
7068
void this.workerPool.destroy();
7169
}
7270
}

packages/angular_devkit/build_angular/src/utils/server-rendering/prerender.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ async function renderPages(
206206

207207
await Promise.all(renderingPromises);
208208
} finally {
209-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
210-
renderWorker.options.minThreads = 0;
211209
void renderWorker.destroy();
212210
}
213211

@@ -268,8 +266,6 @@ async function getAllRoutes(
268266
const { routes: extractedRoutes, warnings }: RoutersExtractorWorkerResult = await renderWorker
269267
.run({})
270268
.finally(() => {
271-
// Workaround piscina bug where a worker thread will be recreated after destroy to meet the minimum.
272-
renderWorker.options.minThreads = 0;
273269
void renderWorker.destroy();
274270
});
275271

0 commit comments

Comments
 (0)