stefan-egli commented on code in PR #6:
URL:
https://github.com/apache/sling-org-apache-sling-commons-scheduler/pull/6#discussion_r1869123335
##########
src/main/java/org/apache/sling/commons/scheduler/impl/QuartzThreadPool.java:
##########
@@ -21,13 +21,18 @@
public class QuartzThreadPool implements org.quartz.spi.ThreadPool {
/** Our executor thread pool */
- private ThreadPool executor;
+ private volatile ThreadPool executor;
+
+ private final Object lock = new Object();
+
+ private volatile int counter;
/**
* Create a new wrapper implementation for Quartz.
*/
public QuartzThreadPool(final ThreadPool executor) {
this.executor = executor;
+ this.counter = executor.getConfiguration().getMaxPoolSize();
Review Comment:
actually on second thought : if it's negative DefaultThreadPool constructor
converts it to Integer.MAX_VALUE and if it's zero ThreadExpiringThreadPool
constructor will fail with an exception. so we might actually be fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]