File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -48,19 +48,19 @@ FOUNDATION_EXPORT NSString *const STNetTaskUnknownError;
4848 Indicates if the net task is waiting for executing or executing.
4949 This value will be set to "YES" immediately after the net task is added to net task queue.
5050 */
51- @property (atomic , assign ) BOOL pending;
51+ @property (atomic , assign , readonly ) BOOL pending;
5252
5353/*
5454 Indicates if the net task is cancelled.
5555 This value would be "NO" by default after net task is created, even the net task is not added to queue.
5656 */
57- @property (atomic , assign ) BOOL cancelled;
57+ @property (atomic , assign , readonly ) BOOL cancelled;
5858
5959/* Indicates if the net task is finished(no matter it's successful or failed). */
60- @property (atomic , assign ) BOOL finished;
60+ @property (atomic , assign , readonly ) BOOL finished;
6161
6262/* The current retry time @see maxRetryCount */
63- @property (atomic , assign ) NSUInteger retryCount;
63+ @property (atomic , assign , readonly ) NSUInteger retryCount;
6464
6565/*
6666 A unique string represents the net task.
Original file line number Diff line number Diff line change 1010
1111NSString *const STNetTaskUnknownError = @" STNetTaskUnknownError" ;
1212
13+ @interface STNetTask ()
14+
15+ @property (atomic , assign ) BOOL pending;
16+ @property (atomic , assign ) BOOL cancelled;
17+ @property (atomic , assign ) BOOL finished;
18+ @property (atomic , assign ) NSUInteger retryCount;
19+
20+ @end
21+
1322@implementation STNetTask
1423
1524- (NSString *)uri
Original file line number Diff line number Diff line change 99#import " STNetTaskQueue.h"
1010#import " STNetTaskQueueLog.h"
1111
12+ @interface STNetTask (STInternal)
13+
14+ @property (atomic , assign ) BOOL pending;
15+ @property (atomic , assign ) BOOL cancelled;
16+ @property (atomic , assign ) BOOL finished;
17+ @property (atomic , assign ) NSUInteger retryCount;
18+
19+ @end
20+
1221@interface STNetTaskQueue ()
1322
1423@property (nonatomic , strong ) NSThread *thread;
You can’t perform that action at this time.
0 commit comments