mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: Always invoke "continuation" for "BackgroundTaskGroup"
Otherwise "QueueProcessor.waitFor()" (and therefore "BackgroundTaskQueue.waitForTasksToFinish()") will never finish in case of error/cancellation as "QueueProcessor.isProcessing" flag is set to "false" only when running "continuation"
This commit is contained in:
@@ -68,11 +68,6 @@ public class BackgroundTaskGroup extends BackgroundTaskQueue {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
continuation.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
end();
|
||||
@@ -83,6 +78,11 @@ public class BackgroundTaskGroup extends BackgroundTaskQueue {
|
||||
LOG.error(e);
|
||||
end();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
continuation.run();
|
||||
}
|
||||
}.queue());
|
||||
}
|
||||
|
||||
@@ -98,12 +98,10 @@ public class BackgroundTaskGroup extends BackgroundTaskQueue {
|
||||
isSuccess = e.isWarning();
|
||||
}
|
||||
finally {
|
||||
if (isSuccess) {
|
||||
continuation.run();
|
||||
}
|
||||
else {
|
||||
if (!isSuccess) {
|
||||
end();
|
||||
}
|
||||
continuation.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user