Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 66 lines (45 sloc) 1.041 kb
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
1 //
f3d43b6 @soffes The Great Rename
soffes authored
2 // SSConcurrentOperation.m
3 // SSToolkit
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
4 //
5 // Created by Sam Soffes on 8/5/10.
e8c3ce3 @soffes Updated comments and renamed SSDrawingMacros to SSDrawingUtilities
soffes authored
6 // Copyright 2010-2011 Sam Soffes. All rights reserved.
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
7 //
8
f3d43b6 @soffes The Great Rename
soffes authored
9 #import "SSConcurrentOperation.h"
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
10
454e654 @soffes Require Apple LLVM compiler 3.0
soffes authored
11 @implementation SSConcurrentOperation {
12 BOOL _isExecuting;
13 BOOL _isFinished;
14 }
15
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
16
bf2d0ec @soffes Started overhauling documentation
soffes authored
17 #pragma mark - NSObject
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
18
19 - (id)init {
20 if ((self = [super init])) {
21 _isExecuting = NO;
22 _isFinished = NO;
23 }
24 return self;
25 }
26
27
bf2d0ec @soffes Started overhauling documentation
soffes authored
28 #pragma mark - NSOperation
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
29
30 - (BOOL)isConcurrent {
31 return YES;
32 }
33
34
35 - (BOOL)isExecuting {
36 return _isExecuting;
37 }
38
39
40 - (BOOL)isFinished {
41 return _isFinished;
42 }
43
44
45 - (void)start {
46 [self willChangeValueForKey:@"isExecuting"];
47 _isExecuting = YES;
48 [self didChangeValueForKey:@"isExecuting"];
49 }
50
51
bf2d0ec @soffes Started overhauling documentation
soffes authored
52 #pragma mark - SSConcurrentOperation
1496dc1 @soffes Added TWConcurrentOperation
soffes authored
53
54 - (void)finish {
55 [self willChangeValueForKey:@"isExecuting"];
56 [self willChangeValueForKey:@"isFinished"];
57
58 _isExecuting = NO;
59 _isFinished = YES;
60
61 [self didChangeValueForKey:@"isExecuting"];
62 [self didChangeValueForKey:@"isFinished"];
63 }
64
65 @end
Something went wrong with that request. Please try again.