Skip to content

Commit 11a6dcd

Browse files
committed
[libdispatch] Remove deprecated methods
* Removes methods introduces in Swift3 that were already marked deprecated based on pre-release review feedback. Fixes <rdar://problem/26479523>
1 parent 8ac413a commit 11a6dcd

File tree

6 files changed

+0
-152
lines changed

6 files changed

+0
-152
lines changed

stdlib/public/SDK/Dispatch/Block.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,6 @@ public class DispatchWorkItem {
9292
}
9393
}
9494

95-
@available(OSX 10.10, iOS 8.0, *)
96-
public extension DispatchWorkItem {
97-
@available(*, deprecated, renamed: "DispatchWorkItem.wait(self:wallTimeout:)")
98-
public func wait(timeout: DispatchWallTime) -> Int {
99-
switch wait(wallTimeout: timeout) {
100-
case .success: return 0
101-
case .timedOut: return Int(KERN_OPERATION_TIMED_OUT)
102-
}
103-
}
104-
}
105-
10695
/// The dispatch_block_t typealias is different from usual closures in that it
10796
/// uses @convention(block). This is to avoid unnecessary bridging between
10897
/// C blocks and Swift closures, which interferes with dispatch APIs that depend

stdlib/public/SDK/Dispatch/Dispatch.swift

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public struct DispatchQoS : Equatable {
5757
@available(OSX 10.10, iOS 8.0, *)
5858
public static let `default` = DispatchQoS(qosClass: .default, relativePriority: 0)
5959

60-
@available(OSX, introduced: 10.10, deprecated: 10.10, renamed: "DispatchQoS.default")
61-
@available(iOS, introduced: 8.0, deprecated: 8.0, renamed: "DispatchQoS.default")
62-
@available(*, deprecated, renamed: "DispatchQoS.default")
63-
public static let defaultQoS = DispatchQoS.default
64-
6560
@available(OSX 10.10, iOS 8.0, *)
6661
public static let userInitiated = DispatchQoS(qosClass: .userInitiated, relativePriority: 0)
6762

@@ -80,11 +75,6 @@ public struct DispatchQoS : Equatable {
8075
@available(OSX 10.10, iOS 8.0, *)
8176
case `default`
8277

83-
@available(OSX, introduced: 10.10, deprecated: 10.10, renamed: "QoSClass.default")
84-
@available(iOS, introduced: 8.0, deprecated: 8.0, renamed: "QoSClass.default")
85-
@available(*, deprecated, renamed: "QoSClass.default")
86-
static let defaultQoS = QoSClass.default
87-
8878
@available(OSX 10.10, iOS 8.0, *)
8979
case userInitiated
9080

@@ -166,16 +156,6 @@ public extension DispatchGroup {
166156
}
167157
}
168158

169-
public extension DispatchGroup {
170-
@available(*, deprecated, renamed: "DispatchGroup.wait(self:wallTimeout:)")
171-
public func wait(walltime timeout: DispatchWallTime) -> Int {
172-
switch wait(wallTimeout: timeout) {
173-
case .success: return 0
174-
case .timedOut: return Int(KERN_OPERATION_TIMED_OUT)
175-
}
176-
}
177-
}
178-
179159
/// dispatch_semaphore
180160

181161
public extension DispatchSemaphore {
@@ -197,12 +177,3 @@ public extension DispatchSemaphore {
197177
}
198178
}
199179

200-
public extension DispatchSemaphore {
201-
@available(*, deprecated, renamed: "DispatchSemaphore.wait(self:wallTimeout:)")
202-
public func wait(walltime timeout: DispatchWalltime) -> Int {
203-
switch wait(wallTimeout: timeout) {
204-
case .success: return 0
205-
case .timedOut: return Int(KERN_OPERATION_TIMED_OUT)
206-
}
207-
}
208-
}

stdlib/public/SDK/Dispatch/IO.swift

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,34 +94,3 @@ public extension DispatchIO {
9494
}
9595
}
9696

97-
extension DispatchIO {
98-
@available(*, deprecated, renamed: "DispatchIO.read(fromFileDescriptor:maxLength:runningHandlerOn:handler:)")
99-
public class func read(fd: Int32, length: Int, queue: DispatchQueue, handler: (DispatchData, Int32) -> Void) {
100-
DispatchIO.read(fromFileDescriptor: fd, maxLength: length, runningHandlerOn: queue, handler: handler)
101-
}
102-
103-
@available(*, deprecated, renamed: "DispatchIO.write(fromFileDescriptor:data:runningHandlerOn:handler:)")
104-
public class func write(fd: Int32, data: DispatchData, queue: DispatchQueue, handler: (DispatchData?, Int32) -> Void) {
105-
DispatchIO.write(fromFileDescriptor: fd, data: data, runningHandlerOn: queue, handler: handler)
106-
}
107-
108-
@available(*, deprecated, renamed: "DispatchIO.barrier(self:execute:)")
109-
public func withBarrier(barrier work: () -> ()) {
110-
barrier(execute: work)
111-
}
112-
113-
@available(*, deprecated, renamed: "DispatchIO.setLimit(self:highWater:)")
114-
public func setHighWater(highWater: Int) {
115-
setLimit(highWater: highWater)
116-
}
117-
118-
@available(*, deprecated, renamed: "DispatchIO.setLimit(self:lowWater:)")
119-
public func setLowWater(lowWater: Int) {
120-
setLimit(lowWater: lowWater)
121-
}
122-
123-
@available(*, deprecated, renamed: "DispatchIO.setInterval(self:interval:flags:)")
124-
public func setInterval(interval: UInt64, flags: IntervalFlags) {
125-
setInterval(interval: .nanoseconds(Int(interval)), flags: flags)
126-
}
127-
}

stdlib/public/SDK/Dispatch/Queue.swift

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -333,52 +333,6 @@ public extension DispatchQueue {
333333
}
334334
}
335335

336-
extension DispatchQueue {
337-
@available(*, deprecated, renamed: "DispatchQueue.sync(self:execute:)")
338-
public func synchronously(execute work: @noescape () -> ()) {
339-
sync(execute: work)
340-
}
341-
342-
@available(OSX, introduced: 10.10, deprecated: 10.12, renamed: "DispatchQueue.sync(self:execute:)")
343-
@available(iOS, introduced: 8.0, deprecated: 10.0, renamed: "DispatchQueue.sync(self:execute:)")
344-
@available(*, deprecated, renamed: "DispatchQueue.sync(self:execute:)")
345-
public func synchronously(execute workItem: DispatchWorkItem) {
346-
sync(execute: workItem)
347-
}
348-
349-
@available(OSX, introduced: 10.10, deprecated: 10.12, renamed: "DispatchQueue.async(self:execute:)")
350-
@available(iOS, introduced: 8.0, deprecated: 10.0, renamed: "DispatchQueue.async(self:execute:)")
351-
@available(*, deprecated, renamed: "DispatchQueue.async(self:execute:)")
352-
public func asynchronously(execute workItem: DispatchWorkItem) {
353-
async(execute: workItem)
354-
}
355-
356-
@available(*, deprecated, renamed: "DispatchQueue.async(self:group:qos:flags:execute:)")
357-
public func asynchronously(group: DispatchGroup? = nil, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @convention(block) () -> Void) {
358-
async(group: group, qos: qos, flags: flags, execute: work)
359-
}
360-
361-
@available(*, deprecated, renamed: "DispatchQueue.sync(self:execute:)")
362-
public func synchronously<T>(execute work: @noescape () throws -> T) rethrows -> T {
363-
return try sync(execute: work)
364-
}
365-
366-
@available(*, deprecated, renamed: "DispatchQueue.sync(self:flags:execute:)")
367-
public func synchronously<T>(flags: DispatchWorkItemFlags, execute work: @noescape () throws -> T) rethrows -> T {
368-
return try sync(flags: flags, execute: work)
369-
}
370-
371-
@available(*, deprecated, renamed: "DispatchQueue.concurrentPerform(iterations:execute:)")
372-
public func apply(applier iterations: Int, execute block: @noescape (Int) -> Void) {
373-
DispatchQueue.concurrentPerform(iterations: iterations, execute: block)
374-
}
375-
376-
@available(*, deprecated, renamed: "DispatchQueue.setTarget(self:queue:)")
377-
public func setTargetQueue(queue: DispatchQueue) {
378-
self.setTarget(queue: queue)
379-
}
380-
}
381-
382336
private func _destructDispatchSpecificValue(ptr: UnsafeMutablePointer<Void>?) {
383337
if let p = ptr {
384338
Unmanaged<AnyObject>.fromOpaque(p).release()

stdlib/public/SDK/Dispatch/Source.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -281,38 +281,6 @@ public extension DispatchSourceTimer {
281281
}
282282
}
283283

284-
public extension DispatchSourceTimer {
285-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleOneshot(self:deadline:leeway:)")
286-
public func setTimer(start: DispatchTime, leeway: DispatchTimeInterval = .nanoseconds(0)) {
287-
scheduleOneshot(deadline: start, leeway: leeway)
288-
}
289-
290-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleOneshot(self:wallDeadline:leeway:)")
291-
public func setTimer(walltime start: DispatchWallTime, leeway: DispatchTimeInterval = .nanoseconds(0)) {
292-
scheduleOneshot(wallDeadline: start, leeway: leeway)
293-
}
294-
295-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleRepeating(self:deadline:interval:leeway:)")
296-
public func setTimer(start: DispatchTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .nanoseconds(0)) {
297-
scheduleRepeating(deadline: start, interval: interval, leeway: leeway)
298-
}
299-
300-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleRepeating(self:deadline:interval:leeway:)")
301-
public func setTimer(start: DispatchTime, interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0)) {
302-
scheduleRepeating(deadline: start, interval: interval, leeway: leeway)
303-
}
304-
305-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleRepeating(self:wallDeadline:interval:leeway:)")
306-
public func setTimer(walltime start: DispatchWallTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .nanoseconds(0)) {
307-
scheduleRepeating(wallDeadline: start, interval: interval, leeway: leeway)
308-
}
309-
310-
@available(*, deprecated, renamed: "DispatchSourceTimer.scheduleRepeating(self:wallDeadline:interval:leeway:)")
311-
public func setTimer(walltime start: DispatchWalltime, interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0)) {
312-
scheduleRepeating(wallDeadline: start, interval: interval, leeway: leeway)
313-
}
314-
}
315-
316284
public extension DispatchSourceFileSystemObject {
317285
public var handle: Int32 {
318286
return Int32(__dispatch_source_get_handle(self as! DispatchSource))

stdlib/public/SDK/Dispatch/Time.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ public func ==(a: DispatchWallTime, b: DispatchWallTime) -> Bool {
7979
return a.rawValue == b.rawValue
8080
}
8181

82-
@available(*, deprecated, renamed: "DispatchWallTime")
83-
public typealias DispatchWalltime = DispatchWallTime
84-
8582
public enum DispatchTimeInterval {
8683
case seconds(Int)
8784
case milliseconds(Int)

0 commit comments

Comments
 (0)