Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3254a0b

Browse files
author
Alex Belozierov
committed
- fix bug in PDispatchGroup
1 parent160389b commit3254a0b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎PosixDispatch/DispatchQueue/PDispatchQueueBackend.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ protocol PDispatchQueueBackend: class {
2222

2323
extensionPDispatchQueueBackend{
2424

25-
funcasync<T>(execute workItem:PDispatchWorkItem<T>){
26-
async(flags: workItem.flags, execute: workItem.perform)
25+
funcasync<T>(group:PDispatchGroup?=nil,execute workItem:PDispatchWorkItem<T>){
26+
async(group: group,flags: workItem.flags, execute: workItem.perform)
2727
}
2828

2929
@discardableResult

‎PosixDispatch/PDispatchGroup.swift‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ class PDispatchGroup {
2727
}
2828

2929
@inlinablefunc wait(){
30-
condition.lockedPerform{ condition.wait()}
30+
condition.lock()
31+
if count!=0{ condition.wait()}
32+
condition.unlock()
3133
}
3234

3335
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp