ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [1/2] incubator-ignite git commit: # IGNITE-11 Use Executors.newFixedThreadPool() to create executor service.
Date Sun, 22 Feb 2015 10:11:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-11 a9ecd99f1 -> e89a70cc9


# IGNITE-11 Use Executors.newFixedThreadPool() to create executor service.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e7171b06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e7171b06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e7171b06

Branch: refs/heads/ignite-11
Commit: e7171b064457e50ce141261f0946326f4165f565
Parents: a9ecd99
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Sun Feb 22 13:10:25 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Sun Feb 22 13:10:25 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7171b06/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
index 87ee2fe..6bd50d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
@@ -1030,8 +1030,7 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements
Discov
         public SocketMultiConnector(Collection<InetSocketAddress> addrs, final int
retryCnt) {
             connInProgress = addrs.size();
 
-            executor = new ThreadPoolExecutor(0, 10, 1L, TimeUnit.MILLISECONDS,
-                new SynchronousQueue<Runnable>());
+            executor = Executors.newFixedThreadPool(Math.min(10, addrs.size()));
 
             for (final InetSocketAddress addr : addrs) {
                 executor.execute(new Runnable() {


Mime
View raw message