commit | author | age
|
a0a843
|
1 |
// |
H |
2 |
// TWTRMultiThreadUtil.h |
|
3 |
// TwitterKit |
|
4 |
// |
|
5 |
// Created by Kang Chen on 3/16/15. |
|
6 |
// Copyright (c) 2015 Twitter. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
@interface TWTRMultiThreadUtil : NSObject |
|
12 |
|
|
13 |
/** |
|
14 |
* Checks that this method was called from a main thread. |
|
15 |
* Call this method from common methods in the public API of this class to catch the most obvious issues. |
|
16 |
*/ |
|
17 |
+ (void)assertMainThread; |
|
18 |
|
|
19 |
/** |
|
20 |
* Warns the user that a method was invoked from a background thread, which is not supported. |
|
21 |
* On debug builds this throws an exception, on release builds it logs to the console. |
|
22 |
*/ |
|
23 |
+ (void)warnForBackgroundThreadUsage; |
|
24 |
|
|
25 |
@end |