Bump guava version to 18.0
New version fixes 16 bugs and includes some API changes [1]. MoreExecutors.directExecutor() is now the new lightweight version of now deprecated sameThreadExecutor(). [1] https://code.google.com/p/guava-libraries/wiki/Release18 Change-Id: I98dbf951b82095504272cc90f1468652621ae2bd
This commit is contained in:
parent
430d50527a
commit
8fb6e98873
@ -130,7 +130,7 @@ public class RebuildNotedb extends SiteProgram {
|
||||
futures.add(future);
|
||||
future.addListener(
|
||||
new RebuildListener(c.getId(), future, ok, doneTask, failedTask),
|
||||
MoreExecutors.sameThreadExecutor());
|
||||
MoreExecutors.directExecutor());
|
||||
}
|
||||
|
||||
mpm.waitFor(Futures.transform(Futures.successfulAsList(futures),
|
||||
@ -212,7 +212,7 @@ public class RebuildNotedb extends SiteProgram {
|
||||
dbInjector.getInstance(WorkQueue.class)
|
||||
.createQueue(threads, "RebuildChange"));
|
||||
} else {
|
||||
return MoreExecutors.sameThreadExecutor();
|
||||
return MoreExecutors.newDirectExecutorService();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class ReceiveCommitsExecutorModule extends AbstractModule {
|
||||
public ListeningExecutorService createChangeUpdateExecutor(@GerritServerConfig Config config) {
|
||||
int poolSize = config.getInt("receive", null, "changeUpdateThreads", 1);
|
||||
if (poolSize <= 1) {
|
||||
return MoreExecutors.sameThreadExecutor();
|
||||
return MoreExecutors.newDirectExecutorService();
|
||||
}
|
||||
return MoreExecutors.listeningDecorator(
|
||||
MoreExecutors.getExitingExecutorService(
|
||||
|
@ -195,7 +195,7 @@ public class ChangeBatchIndexer {
|
||||
fail(project, e);
|
||||
throw e;
|
||||
}
|
||||
}, MoreExecutors.sameThreadExecutor());
|
||||
}, MoreExecutors.directExecutor());
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -106,7 +106,7 @@ public class IndexModule extends LifecycleModule {
|
||||
threads = config.getInt("index", null, "threads", 0);
|
||||
}
|
||||
if (threads <= 0) {
|
||||
return MoreExecutors.sameThreadExecutor();
|
||||
return MoreExecutors.newDirectExecutorService();
|
||||
}
|
||||
return MoreExecutors.listeningDecorator(
|
||||
workQueue.createQueue(threads, "index"));
|
||||
|
Loading…
Reference in New Issue
Block a user