This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new f3e80cc  Need to first add pending for tasks which might run sync
f3e80cc is described below

commit f3e80ccba18ff8dd9c8dcda871dfe75831433c86
Author: Harbs <ha...@in-tools.com>
AuthorDate: Wed Feb 16 14:20:46 2022 +0200

    Need to first add pending for tasks which might run sync
---
 .../royale/org/apache/royale/utils/async/CompoundAsyncTask.as     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as
index b1fb47c..c5e34f1 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as
@@ -94,11 +94,11 @@ package org.apache.royale.utils.async
         return;
       }
       _status = "pending";
-      pendingTasks = [];
-      for(var i:int=0;i<tasks.length;i++){
-        var task:IAsyncTask = tasks[i];
+
+      pendingTasks = tasks.slice();
+
+      for each(var task:IAsyncTask in tasks){
         task.done(handleDone);
-        pendingTasks.push(task);
         task.run();
       }
     }

Reply via email to