-
Notifications
You must be signed in to change notification settings - Fork 9
/
MAFuture.h
36 lines (22 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
33
34
35
36
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__)))
#if TARGET_OS_IPHONE > 0
#ifdef __IPHONE_4_0
#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_4_0
#endif