/*
 * This file is part of the YSSDWebImage package.
 * (c) Olivier Poitrey <rs@dailymotion.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

#import "YSSDWebImageCompat.h"

@class YSSDAsyncBlockOperation;
typedef void (^YSSDAsyncBlock)(YSSDAsyncBlockOperation * __nonnull asyncOperation);

/// A async block operation, success after you call `completer` (not like `NSBlockOperation` which is for sync block, success on return)
@interface YSSDAsyncBlockOperation : NSOperation

- (nonnull instancetype)initWithBlock:(nonnull YSSDAsyncBlock)block;
+ (nonnull instancetype)blockOperationWithBlock:(nonnull YSSDAsyncBlock)block;
- (void)complete;

@end
