QNCFHttpThreadPool.h 580 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // QNCFHttpThreadPool.h
  3. // Qiniu
  4. //
  5. // Created by yangsen on 2021/10/13.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface QNCFHttpThread : NSThread
  10. @property(nonatomic, assign, readonly)NSInteger operationCount;
  11. @end
  12. @interface QNCFHttpThreadPool : NSObject
  13. @property(nonatomic, assign, readonly)NSInteger maxOperationPerThread;
  14. + (instancetype)shared;
  15. - (QNCFHttpThread *)getOneThread;
  16. - (void)addOperationCountOfThread:(QNCFHttpThread *)thread;
  17. - (void)subtractOperationCountOfThread:(QNCFHttpThread *)thread;
  18. @end
  19. NS_ASSUME_NONNULL_END