Skip to content

Commit

Permalink
fix: only first sync task uses multi-threading
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Mar 29, 2024
1 parent b25a0f5 commit 886bc0a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ protected void doExecute(final List<SyncCommandConfig> tasks) throws Exception {
*/
DesktopNotifications.showTransient(MessageType.INFO, "Syncing started...", //
"FROM: " + task.sourceRootAbsolute + "\nTO: " + task.targetRootAbsolute);
threadsDone.set(false);
if (task_threads == 1) {
sync(task);
} else {
Expand Down Expand Up @@ -276,6 +277,7 @@ private void sync(final SyncCommandConfig task) throws IOException {
while (state == State.NORMAL) {
final var source = getNextSourceEntry(task);
if (source == null) {
LOG.debug("Done.");
break;
}

Expand Down

0 comments on commit 886bc0a

Please sign in to comment.