This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <pthread.h> | |
#import <stdatomic.h> | |
@interface AHDeadlockDetector () | |
/** | |
* The current detection thread, if one is running. We store this weakly because | |
* if the thread has exited, why keep it around? In practice however, we nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Performs fast enumeration and keeps track of the enumeration index for you. | |
* If you don't need the index, you can use for-in directly, or pass `_` for the index name. | |
* Fast enumeration is _much_ faster than block enumeration, mostly due to the removal | |
* of many calls to -retain/-release. The only case where block enumeration is justified | |
* is in NSDictionary (if you need both key&value) and NSIndexSet. | |
* | |
* Example: | |
* PINForEach(NSString *str, self.titles, row, ({ | |
* NSLog(@"Title %zd: %@", row, str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Don't use this in production! | |
* | |
* Screenshot of it working: https://user-images.githubusercontent.com/2466893/27601666-f65159f0-5b24-11e7-969d-fe86103c21de.png | |
*/ | |
/** | |
* This is real, private CA API. Valid as of iOS 10. | |
*/ | |
typedef enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ASCache.m | |
// Texture | |
// | |
// Copyright (c) 2018-present, Pinterest, Inc. All rights reserved. | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer