File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,15 @@ -(bool)canStillBeCancelled {
97
97
}
98
98
99
99
-(TOCCancelHandler) _preserveMainThreadness : (TOCCancelHandler)cancelHandler {
100
- if (![ NSThread isMainThread ] ) return cancelHandler;
100
+ if (!NSThread . isMainThread ) return cancelHandler;
101
101
102
102
return ^{ [TOCInternal_BlockObject performBlock: cancelHandler
103
- onThread: [ NSThread mainThread ] ]; };
103
+ onThread: NSThread . mainThread]; };
104
104
}
105
105
106
106
-(TOCCancelHandler) _preserveMainThreadness : (TOCCancelHandler)cancelHandler
107
107
andCheck : (TOCCancelToken*)unlessCancelledToken {
108
- if (![ NSThread isMainThread ] ) return cancelHandler;
108
+ if (!NSThread . isMainThread ) return cancelHandler;
109
109
110
110
return [self _preserveMainThreadness: ^{
111
111
// do a final check, to help the caller out
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ -(void)testThreadSafety_cancellationsNotLost {
432
432
});
433
433
434
434
435
- for (int rep = 0 ; rep < 10 && OSAtomicAdd32 (0 , &ran) < n; rep++) {
435
+ for (int rep = 0 ; rep < 1000 && OSAtomicAdd32 (0 , &ran) < n; rep++) {
436
436
usleep (1000 *10 );
437
437
}
438
438
test (OSAtomicAdd32 (0 , &ran) == n);
You can’t perform that action at this time.
0 commit comments