Skip to content

Commit

Permalink
Prepare for 0.5.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
groboclown committed May 11, 2015
1 parent b3fc166 commit 2e9c0ab
Showing 1 changed file with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions plugin/src/net/groboclown/idea/p4ic/server/RawServerExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
*/
public class RawServerExecutor {
private static final Logger LOG = Logger.getInstance(RawServerExecutor.class);

// TODO make these configurable
private static final int MAX_CONNECTIONS = 2;
private static final int MAX_CONNECTION_WAIT_TIME = 30 * 1000;

Expand Down Expand Up @@ -103,40 +105,9 @@ public void dispose() {

private <T> T performAction(@NotNull Project project, @NotNull ServerTask<T> runner)
throws VcsException, CancellationException {
// This is a suggestion, but there are some solid reasons why this should
// be in the AWT (specifically, edit operations are expected to run in EDT)
//final Application appManager = ApplicationManager.getApplication();
//if (appManager.isDispatchThread()) {
// //LOG.info("Should not ever run P4 commands in the EDT");
// throw new IllegalStateException("Must not ever run P4 commands in the EDT");
//}

/* Infinite simultaneous connection logic
P4Exec exec;
synchronized (poolSync) {
if (idlePool.isEmpty()) {
LOG.info("Creating a new Perforce connection object");
exec = new P4Exec(config, clientName, connectionHandler,
new OnServerConfigurationProblem.WithMessageBus(project));
} else {
exec = idlePool.remove(idlePool.size() - 1);
}
}
try {
return runner.run(exec);
} finally {
synchronized (poolSync) {
if (disposed || isOffline() || closingPool.contains(exec)) {
exec.dispose();
closingPool.remove(exec);
// do not put back into any pool.
} else {
activePool.remove(exec);
idlePool.add(exec);
}
}
}
*/
// The actions should not run in the dispatch thread,
// but there are some solid reasons why this sometimes can run
// in the AWT (specifically, edit operations are expected to run in EDT)

// This call indicates an attempt to reconnect to the server.
closed = false;
Expand Down

0 comments on commit 2e9c0ab

Please sign in to comment.