Skip to content

Commit

Permalink
Remove dead code in BFCancellationTokenSource.
Browse files Browse the repository at this point in the history
  • Loading branch information
nlutsenko committed Aug 11, 2015
1 parent a51f46f commit 93ddbaf
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions Bolts/Common/BFCancellationTokenSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,12 @@

#import "BFCancellationToken.h"

@interface BFCancellationTokenSource ()

@property (nonatomic, strong, readwrite) BFCancellationToken *token;
@property (atomic, assign, readwrite, getter=isCancellationRequested) BOOL cancellationRequested;
@property (atomic, assign) BOOL disposed;
@property (nonatomic, strong) NSObject *lock;

@end

@interface BFCancellationToken (BFCancellationTokenSource)

- (void)cancel;

- (void)cancelAfterDelay:(int)millis;

- (void)dispose;

- (void)throwIfDisposed;

@end
Expand All @@ -37,18 +26,19 @@ @implementation BFCancellationTokenSource

#pragma mark - Initializer

+ (instancetype)cancellationTokenSource {
return [BFCancellationTokenSource new];
}

- (instancetype)init {
if (self = [super init]) {
_token = [BFCancellationToken new];
_lock = [NSObject new];
}
self = [super init];
if (!self) return nil;

_token = [BFCancellationToken new];

return self;
}

+ (instancetype)cancellationTokenSource {
return [BFCancellationTokenSource new];
}

#pragma mark - Custom Setters/Getters

- (BOOL)isCancellationRequested {
Expand Down

0 comments on commit 93ddbaf

Please sign in to comment.