forked from mikeash/MAFuture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAFuture.h
32 lines (20 loc) · 1.3 KB
/
MAFuture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
id MABackgroundFuture(id (^block)(void));
id MALazyFuture(id (^block)(void));
#define MABackgroundFuture(...) ((__typeof((__VA_ARGS__)()))MABackgroundFuture((id (^)(void))(__VA_ARGS__)))
#define MALazyFuture(...) ((__typeof((__VA_ARGS__)()))MALazyFuture((id (^)(void))(__VA_ARGS__)))
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
#pragma mark -
id IKMemoryAwareFuture(id (^block)(void));
id IKMemoryAwareFutureCreate(id (^block)(void));
void IKMemoryAwareFutureBeginContentAccess(id future);
void IKMemoryAwareFutureEndContentAccess(id future);
BOOL IKMemoryAwareFutureIsObserving(id future);
void IKInvalidateMemoryAwareFuture(id future);
#define IKMemoryAwareFuture(...)((__typeof((__VA_ARGS__)()))IKMemoryAwareFuture((id (^)(void))(__VA_ARGS__)))
#define IKMemoryAwareFutureCreate(...)((__typeof((__VA_ARGS__)()))IKMemoryAwareFutureCreate((id (^)(void))(__VA_ARGS__)))
#pragma mark -
id IKAutoArchivingMemoryAwareFuture(id (^block)(void));
id IKAutoArchivingMemoryAwareFutureCreate(id (^block)(void));
#define IKAutoArchivingMemoryAwareFuture(...)((__typeof((__VA_ARGS__)()))IKAutoArchivingMemoryAwareFuture((id (^)(void))(__VA_ARGS__)))
#define IKAutoArchivingMemoryAwareFutureCreate(...)((__typeof((__VA_ARGS__)()))IKAutoArchivingMemoryAwareFutureCreate((id (^)(void))(__VA_ARGS__)))
#endif // __IPHONE_OS_VERSION_MAX_ALLOWED