Skip to content

Commit bbc8f14

Browse files
committed
对 Demo5 的想要展示的作用进行解释
1 parent 0c3a319 commit bbc8f14

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

01_Parse的多线程处理思路/Parse的底层多线程处理思路.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,16 @@ CYLDispatchSemaphoreTest(10384,0x112d43000) malloc: *** error for object 0x7f898
923923
为了加深对dispatch_semaphore_t基本用法的理解,再给一个示例 Demo:
924924

925925
思考下为何会如何打印:
926+
然后把分别试一下第三行和第四行:
927+
928+
929+
```Objective-C
930+
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
931+
// dispatch_semaphore_t semaphore = dispatch_semaphore_create(1);
932+
```
933+
934+
然后观察下打印。
935+
926936

927937
详见 Demo5(Demo_05_展示dispatch_semaphore_t基本用法)
928938

0 commit comments

Comments
 (0)