单军华
2018-04-20 2197e837490f5083d18d9fdb97265d1e0f04832a
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
//
//  GCDSemaphore.h
//  GCD
//
//  用法
//  http://www.cnblogs.com/YouXianMing/p/3659204.html
//
//  Created by XianMingYou on 15/3/15.
//  Copyright (c) 2015年 XianMingYou. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
@interface GCDSemaphore : NSObject
 
@property (strong, readonly, nonatomic) dispatch_semaphore_t dispatchSemaphore;
 
#pragma 初始化
- (instancetype)init;
- (instancetype)initWithValue:(long)value;
 
#pragma mark - 用法
- (BOOL)signal;
- (void)wait;
- (BOOL)wait:(int64_t)delta;
 
@end