Skip to content

Commit 980fbdc

Browse files
committed
fix another race
1 parent 59f12de commit 980fbdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hxcoro/task/AbstractTask.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ abstract class AbstractTask implements ICancellationToken {
265265
// called from child
266266

267267
function childCompletes(child:AbstractTask, processResult:Bool) {
268-
numActiveChildren.sub(1);
269268
if (processResult) {
270269
switch (child.state.load()) {
271270
case Completed:
@@ -281,6 +280,7 @@ abstract class AbstractTask implements ICancellationToken {
281280
throw new TaskException('Invalid state $state in childCompletes');
282281
}
283282
}
283+
numActiveChildren.sub(1);
284284
checkCompletion();
285285
}
286286

0 commit comments

Comments
 (0)