Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (38 sloc) 1.03 KB
// SSConcurrentOperation.h
// SSToolkit
// Created by Sam Soffes on 8/5/10.
// Copyright 2010-2011 Sam Soffes. All rights reserved.
@brief A simple wrapper for concurrent NSOperations
Subclasses should override the start and stop methods. Here is
a basic example.
- (void)start {
[super start];
networkRequest = [[NetworkRequest alloc] init];
[networkRequest start];
- (void)finish {
[networkRequest cancel];
[networkRequest release];
[super finish];
This allows for convenient handling of asynchronous calls in an operation.
@interface SSConcurrentOperation : NSOperation {
BOOL _isExecuting;
BOOL _isFinished;
@brief Finishes the receiver's task.
Subclasses must implement their own versions of finish to clean up anything
before the operation completes. After performing the class-specific functionality,
the subclass method should incorporate superclass versions of finish through a message to super.
- (void)finish;
Jump to Line
Something went wrong with that request. Please try again.