Skip to content

Commit 1f30153

Browse files
authored
fix(worker): Dont deprecate non-reuseV8Context yet (#1313)
1 parent 6505f8d commit 1f30153

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/worker/src/worker-options.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,11 @@ export interface WorkerOptions {
487487
* From running basic stress tests we've observed 2/3 reduction in memory usage and 1/3 to 1/2 in CPU usage with this
488488
* feature turned on.
489489
*
490+
* NOTE: We strongly recommend enabling the Reuse V8 Context execution model, and there is currently no known reason
491+
* not to use it. Support for the legacy execution model may get removed at some point in the future. Please report
492+
* any issue that requires you to disable `reuseV8Context`.
493+
*
490494
* @default true
491-
* @deprecated There is currently no known reason to disable the Reuse V8 Context execution model.
492-
* The legacy execution model will be completely removed at some point in the future (no earlier than 1.10.0).
493-
* Please report any issue that requires you to disable `reuseV8Context`.
494495
*/
495496
reuseV8Context?: boolean;
496497

@@ -675,7 +676,6 @@ export function addDefaultWorkerOptions(options: WorkerOptions): WorkerOptionsWi
675676
const maxConcurrentWorkflowTaskExecutions = options.maxConcurrentWorkflowTaskExecutions ?? 40;
676677
const maxConcurrentActivityTaskExecutions = options.maxConcurrentActivityTaskExecutions ?? 100;
677678

678-
// eslint-disable-next-line deprecation/deprecation
679679
const reuseV8Context = options.reuseV8Context ?? true;
680680

681681
const heapSizeMiB = v8.getHeapStatistics().heap_size_limit / MiB;

packages/worker/src/worker.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ export class Worker {
466466
// This isn't required for vscode, only for Chrome Dev Tools which doesn't support debugging worker threads.
467467
// We also rely on this in debug-replayer where we inject a global variable to be read from workflow context.
468468
if (compiledOptions.debugMode) {
469-
// eslint-disable-next-line deprecation/deprecation
470469
if (compiledOptions.reuseV8Context) {
471470
return await ReusableVMWorkflowCreator.create(
472471
workflowBundle,
@@ -484,7 +483,6 @@ export class Worker {
484483
workflowBundle,
485484
threadPoolSize: compiledOptions.workflowThreadPoolSize,
486485
isolateExecutionTimeoutMs: compiledOptions.isolateExecutionTimeoutMs,
487-
// eslint-disable-next-line deprecation/deprecation
488486
reuseV8Context: compiledOptions.reuseV8Context ?? true,
489487
registeredActivityNames,
490488
});

0 commit comments

Comments
 (0)