Executors.newFixedThreadPool(10, Threads.createDaemonThreadFactory("program-gen-%d"))
);
try {
List<ListenableFuture<Location>> futures = Lists.newArrayList();
for (final ProgramSpecification spec: specifications) {
ListenableFuture<Location> future = executorService.submit(
new Callable<Location>() {
@Override
public Location call() throws Exception {
ProgramType type = ProgramTypes.fromSpecification(spec);
String name = String.format(Locale.ENGLISH, "%s/%s", type, applicationName);