We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f85f987 commit b5462d1Copy full SHA for b5462d1
src/swift/Dispatch.swift
@@ -433,9 +433,8 @@ public func dispatch_group_leave(group:dispatch_group_t) -> Void {
433
// semaphore.h
434
//////////
435
436
-public func dispatch_semaphore_create(value:Int) -> dispatch_semaphore_t? {
437
- let csem = CDispatch.dispatch_semaphore_create(value)
438
- return csem != nil ? dispatch_semaphore_t(csem) : nil
+public func dispatch_semaphore_create(value:Int) -> dispatch_semaphore_t {
+ return dispatch_semaphore_t(CDispatch.dispatch_semaphore_create(value))
439
}
440
441
public func dispatch_semaphore_wait(dsema:dispatch_semaphore_t, _ timeout:dispatch_time_t) -> Int {
0 commit comments