Skip to content

Commit

Permalink
Merge pull request #42912 from quaff
Browse files Browse the repository at this point in the history
* pr/42912:
  Polish

Closes gh-42912
  • Loading branch information
snicoll committed Oct 29, 2024
2 parents e5ec380 + 46c40b4 commit 619b24a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ThreadPoolTaskExecutor applicationTaskExecutor(ThreadPoolTaskExecutorBuilder thr
static class ThreadPoolTaskExecutorBuilderConfiguration {

@Bean
@ConditionalOnMissingBean(ThreadPoolTaskExecutorBuilder.class)
@ConditionalOnMissingBean
ThreadPoolTaskExecutorBuilder threadPoolTaskExecutorBuilder(TaskExecutionProperties properties,
ObjectProvider<ThreadPoolTaskExecutorCustomizer> threadPoolTaskExecutorCustomizers,
ObjectProvider<TaskDecorator> taskDecorator) {
Expand Down Expand Up @@ -121,9 +121,7 @@ SimpleAsyncTaskExecutorBuilder simpleAsyncTaskExecutorBuilder() {
@ConditionalOnMissingBean
@ConditionalOnThreading(Threading.VIRTUAL)
SimpleAsyncTaskExecutorBuilder simpleAsyncTaskExecutorBuilderVirtualThreads() {
SimpleAsyncTaskExecutorBuilder builder = builder();
builder = builder.virtualThreads(true);
return builder;
return builder().virtualThreads(true);
}

private SimpleAsyncTaskExecutorBuilder builder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ThreadPoolTaskScheduler taskScheduler(ThreadPoolTaskSchedulerBuilder threadPoolT
static class ThreadPoolTaskSchedulerBuilderConfiguration {

@Bean
@ConditionalOnMissingBean(ThreadPoolTaskSchedulerBuilder.class)
@ConditionalOnMissingBean
ThreadPoolTaskSchedulerBuilder threadPoolTaskSchedulerBuilder(TaskSchedulingProperties properties,
ObjectProvider<ThreadPoolTaskSchedulerCustomizer> threadPoolTaskSchedulerCustomizers) {
TaskSchedulingProperties.Shutdown shutdown = properties.getShutdown();
Expand Down Expand Up @@ -104,9 +104,7 @@ SimpleAsyncTaskSchedulerBuilder simpleAsyncTaskSchedulerBuilder() {
@ConditionalOnMissingBean
@ConditionalOnThreading(Threading.VIRTUAL)
SimpleAsyncTaskSchedulerBuilder simpleAsyncTaskSchedulerBuilderVirtualThreads() {
SimpleAsyncTaskSchedulerBuilder builder = builder();
builder = builder.virtualThreads(true);
return builder;
return builder().virtualThreads(true);
}

private SimpleAsyncTaskSchedulerBuilder builder() {
Expand Down

0 comments on commit 619b24a

Please sign in to comment.