Skip to content

Commit 376223c

Browse files
committed
Merge branch '6.0.x'
# Conflicts: # spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
2 parents ce80637 + abbea39 commit 376223c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingConfigurer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,10 +40,10 @@
4040
public interface SchedulingConfigurer {
4141

4242
/**
43-
* Callback allowing a {@link org.springframework.scheduling.TaskScheduler
44-
* TaskScheduler} and specific {@link org.springframework.scheduling.config.Task Task}
45-
* instances to be registered against the given the {@link ScheduledTaskRegistrar}.
46-
* @param taskRegistrar the registrar to be configured.
43+
* Callback allowing a {@link org.springframework.scheduling.TaskScheduler}
44+
* and specific {@link org.springframework.scheduling.config.Task} instances
45+
* to be registered against the given the {@link ScheduledTaskRegistrar}.
46+
* @param taskRegistrar the registrar to be configured
4747
*/
4848
void configureTasks(ScheduledTaskRegistrar taskRegistrar);
4949

spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
6969

7070
/**
7171
* Set the maximum number of concurrent access attempts allowed.
72-
* -1 indicates unbounded concurrency.
72+
* The default of -1 indicates no concurrency limit at all.
7373
* <p>In principle, this limit can be changed at runtime,
7474
* although it is generally designed as a config time setting.
7575
* <p>NOTE: Do not switch between -1 and any concrete limit at runtime,
@@ -143,9 +143,10 @@ protected void beforeAccess() {
143143
*/
144144
protected void afterAccess() {
145145
if (this.concurrencyLimit >= 0) {
146+
boolean debug = logger.isDebugEnabled();
146147
synchronized (this.monitor) {
147148
this.concurrencyCount--;
148-
if (logger.isDebugEnabled()) {
149+
if (debug) {
149150
logger.debug("Returning from throttle at concurrency count " + this.concurrencyCount);
150151
}
151152
this.monitor.notify();

0 commit comments

Comments
 (0)