File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 71
71
#import " Foundation/NSThread.h"
72
72
#import " Foundation/NSKeyValueObserving.h"
73
73
#import " GNUstepBase/NSObject+GNUstepBase.h"
74
+ #import " GSFastEnumeration.h"
74
75
75
76
#define GSInternal NSProgressInternal
76
77
#include " GSInternal.h"
@@ -453,10 +454,20 @@ - (BOOL) cancelled
453
454
454
455
- (void ) cancel
455
456
{
457
+ GS_MUTEX_LOCK (_lock);
456
458
[self willChangeValueForKey: @" cancelled" ];
457
459
CALL_BLOCK_NO_ARGS (internal->_cancellationHandler );
458
460
internal->_cancelled = YES ;
459
461
[self didChangeValueForKey: @" cancelled" ];
462
+
463
+ // Cancel all child progresses
464
+ FOR_IN (NSProgress *, child, _children)
465
+ {
466
+ [child cancel ];
467
+ }
468
+ END_FOR_IN (children)
469
+
470
+ GS_MUTEX_UNLOCK (_lock);
460
471
}
461
472
462
473
- (void ) setCancellationHandler : (GSProgressCancellationHandler) handler
You can’t perform that action at this time.
0 commit comments