Skip to content

Commit

Permalink
use getMaxPoolSize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aazhar committed Mar 3, 2021
1 parent 556e8c9 commit dcfe221
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -91,7 +91,7 @@ public <T extends Object> void pushRequest(CrossrefRequest<T> request, CrossrefR
request.addListener(listener);
synchronized(this) {
// we should limite the number of active threads depending on crossref api limits
while(((ThreadPoolExecutor)executorService).getActiveCount()>=this.max_pool_size) {
while(((ThreadPoolExecutor)executorService).getActiveCount()>=this.getMax_pool_size()) {
try {
TimeUnit.MICROSECONDS.sleep(1);
} catch (InterruptedException e) {
Expand Down

0 comments on commit dcfe221

Please sign in to comment.