public SshCommandFactory(IGitblit gitblit, IdGenerator idGenerator) {
this.gitblit = gitblit;
int threads = gitblit.getSettings().getInteger(Keys.git.sshCommandStartThreads, 2);
WorkQueue workQueue = new WorkQueue(idGenerator);
startExecutor = workQueue.createQueue(threads, "SshCommandStart");
destroyExecutor = Executors.newSingleThreadExecutor(
new ThreadFactoryBuilder()
.setNameFormat("SshCommandDestroy-%s")
.setDaemon(true)
.build());