You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/10/08 08:44:23 UTC
[ignite-teamcity-bot] branch master updated: IGNITE-9800: Faster
builds search engine development: not used yet
This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/master by this push:
new 64def67 IGNITE-9800: Faster builds search engine development: not used yet
64def67 is described below
commit 64def67da36de1d6037c97bf1b06d1079c3947ee
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Mon Oct 8 11:44:21 2018 +0300
IGNITE-9800: Faster builds search engine development: not used yet
---
.../org/apache/ignite/ci/di/scheduler/TcBotScheduler.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/TcBotScheduler.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/TcBotScheduler.java
index f3d2c8e..40508e8 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/TcBotScheduler.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/TcBotScheduler.java
@@ -27,11 +27,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.ci.di.MonitoredTask;
class TcBotScheduler implements IScheduler {
- /** Initial guard. */
- private AtomicBoolean initGuard = new AtomicBoolean();
-
/** Executor service. */
- private volatile ScheduledExecutorService executorSvc;
+ private volatile ScheduledExecutorService executorSvc = Executors.newScheduledThreadPool(3);
/** Submit named task checker guard. */
private AtomicBoolean tickGuard = new AtomicBoolean();
@@ -71,12 +68,10 @@ class TcBotScheduler implements IScheduler {
executorSvc.shutdown();
}
+ /**
+ *
+ */
private ScheduledExecutorService service() {
- if (executorSvc == null && initGuard.compareAndSet(false, true))
- executorSvc = Executors.newScheduledThreadPool(3);
-
- Preconditions.checkNotNull(executorSvc, "Service should be created");
-
- return executorSvc;
+ return Preconditions.checkNotNull(executorSvc, "Service should be created");
}
}