Skip to content

Commit

Permalink
Merge pull request #36098 from ozangunalp/replace_VT_executor_method_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier authored Sep 22, 2023
2 parents 68c2af1 + 166c9cb commit 0e86e62
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ public Executor get() {
}
};

public static final Supplier<Executor> VTHREAD_EXECUTOR_SUPPLIER = new Supplier<Executor>() {
@Override
public Executor get() {
return VirtualThreadsRecorder.getCurrent();
}
};

static volatile Deployment currentDeployment;

public static Deployment getCurrentDeployment() {
Expand Down Expand Up @@ -129,7 +136,7 @@ public ResteasyReactiveRequestContext createContext(Deployment deployment,
}

RuntimeDeploymentManager runtimeDeploymentManager = new RuntimeDeploymentManager(info, EXECUTOR_SUPPLIER,
VirtualThreadsRecorder::getCurrent,
VTHREAD_EXECUTOR_SUPPLIER,
closeTaskHandler, contextFactory, new ArcThreadSetupAction(beanContainer.requestContext()),
vertxConfig.rootPath);
Deployment deployment = runtimeDeploymentManager.deploy();
Expand Down

0 comments on commit 0e86e62

Please sign in to comment.