Git.runInBackground: don't use the queue.

The most of Git activity is produce by commands invoked by the user.
In this case there is no sense in making the user wait until the previous command is completed
(for example, fetch can take a very long time, why should I wait for it to see the history of a file?)
Most of the others (e.g. in GitChangeProvider or GitUpdateProcess) are executed in their own general VCS processes.
The write-lock is taken anyway globally in GitHandler when needed.
This commit is contained in:
Kirill Likhodedov
2012-04-23 15:32:12 +04:00
parent 8f9a57b653
commit 7281d44b8b
+1 -6
View File
@@ -127,7 +127,6 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
private GitVFSListener myVFSListener; // a VFS listener that tracks file addition, deletion, and renaming.
private final BackgroundTaskQueue myTaskQueue; // The queue that is used to schedule background task from actions
private final ReadWriteLock myCommandLock = new ReentrantReadWriteLock(true); // The command read/write lock
private final TreeDiffProvider myTreeDiffProvider;
private final GitCommitAndPushExecutor myCommitAndPushExecutor;
@@ -172,7 +171,6 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
myOutgoingChangesProvider = new GitOutgoingChangesProvider(myProject);
myTreeDiffProvider = new GitTreeDiffProvider(myProject);
myCommitAndPushExecutor = new GitCommitAndPushExecutor(myCheckinEnvironment);
myTaskQueue = new BackgroundTaskQueue(myProject, GitBundle.getString("task.queue.title"));
myExecutableValidator = new GitExecutableValidator(myProject, this);
myPlatformFacade = ServiceManager.getService(myProject, PlatformFacade.class);
}
@@ -187,10 +185,7 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
* @param task the task to run
*/
public static void runInBackground(Task.Backgroundable task) {
GitVcs vcs = getInstance(task.getProject());
if (vcs != null) {
vcs.myTaskQueue.run(task);
}
task.queue();
}
/**