Skip to content

Commit

Permalink
Replace VirtualThreadsRecorder method ref by supplier
Browse files Browse the repository at this point in the history
  • Loading branch information
ozangunalp committed Sep 22, 2023
1 parent af4208a commit 166c9cb
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 166c9cb

Please sign in to comment.