Documentation Archive Developer
Search

Dispatch Changes for Swift

Dispatch

Removed dispatch_block_flags_t.init(_: UInt)
Removed dispatch_block_flags_t.init(rawValue: UInt)
Removed dispatch_block_flags_t.rawValue
Removed dispatch_block_t
Removed DISPATCH_CURRENT_QUEUE_LABEL
Removed dispatch_data_empty
Removed dispatch_get_global_queue(_: qos_class_t, _: UInt) -> dispatch_queue_t
Removed DISPATCH_IO_RANDOM
Removed DISPATCH_IO_STOP
Removed DISPATCH_IO_STREAM
Removed DISPATCH_IO_STRICT_INTERVAL
Removed DISPATCH_MACH_SEND_DEAD
Removed DISPATCH_MEMORYPRESSURE_CRITICAL
Removed DISPATCH_MEMORYPRESSURE_NORMAL
Removed DISPATCH_MEMORYPRESSURE_WARN
Removed DISPATCH_PROC_EXEC
Removed DISPATCH_PROC_EXIT
Removed DISPATCH_PROC_FORK
Removed DISPATCH_PROC_SIGNAL
Removed DISPATCH_QUEUE_CONCURRENT
Removed DISPATCH_QUEUE_PRIORITY_BACKGROUND
Removed DISPATCH_QUEUE_PRIORITY_DEFAULT
Removed DISPATCH_QUEUE_PRIORITY_HIGH
Removed DISPATCH_QUEUE_PRIORITY_LOW
Removed DISPATCH_QUEUE_SERIAL
Removed DISPATCH_SOURCE_TYPE_DATA_ADD
Removed DISPATCH_SOURCE_TYPE_DATA_OR
Removed DISPATCH_SOURCE_TYPE_MACH_RECV
Removed DISPATCH_SOURCE_TYPE_MACH_SEND
Removed DISPATCH_SOURCE_TYPE_MEMORYPRESSURE
Removed DISPATCH_SOURCE_TYPE_PROC
Removed DISPATCH_SOURCE_TYPE_READ
Removed DISPATCH_SOURCE_TYPE_SIGNAL
Removed DISPATCH_SOURCE_TYPE_TIMER
Removed DISPATCH_SOURCE_TYPE_VNODE
Removed DISPATCH_SOURCE_TYPE_WRITE
Removed DISPATCH_TARGET_QUEUE_DEFAULT
Removed DISPATCH_TIMER_STRICT
Removed DISPATCH_VNODE_ATTRIB
Removed DISPATCH_VNODE_DELETE
Removed DISPATCH_VNODE_EXTEND
Removed DISPATCH_VNODE_LINK
Removed DISPATCH_VNODE_RENAME
Removed DISPATCH_VNODE_REVOKE
Removed DISPATCH_VNODE_WRITE
Added DispatchData.copyBytes(to: UnsafeMutablePointer<UInt8>, from: CountableRange<DispatchData.Index>)
Added DispatchData.copyBytes<DestinationType>(to: UnsafeMutableBufferPointer<DestinationType>, from: CountableRange<DispatchData.Index>?) -> Int
Added DispatchData.count
Added DispatchData.count
Added DispatchData.distance(from: Int, to: Int) -> Int
Added DispatchData.elementsEqual<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence) -> Bool
Added DispatchData.elementsEqual<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchData.flatMap<ElementOfResult>(_: (UInt8) throws -> ElementOfResult?) rethrows -> [ElementOfResult]
Added DispatchData.flatMap<SegmentOfResult : Sequence>(_: (UInt8) throws -> SegmentOfResult) rethrows -> [SegmentOfResult.Iterator.Element]
Added DispatchData.formIndex(_: Int, offsetBy: Int)
Added DispatchData.formIndex(_: Int, offsetBy: Int, limitedBy: Int) -> Bool
Added DispatchData.formIndex(after: Int)
Added DispatchData.formIndex(before: Int)
Added DispatchData.index(_: Int, offsetBy: Int) -> Int
Added DispatchData.index(_: Int, offsetBy: Int, limitedBy: Int) -> Int?
Added DispatchData.index(of: UInt8) -> Int?
Added DispatchData.index(where: (UInt8) throws -> Bool) rethrows -> Int?
Added DispatchData.indices
Added DispatchData.lazy
Added DispatchData.lazy
Added DispatchData.lexicographicallyPrecedes<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence) -> Bool
Added DispatchData.lexicographicallyPrecedes<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchData.map<T>(_: (UInt8) throws -> T) rethrows -> [T]
Added DispatchData.map<T>(_: (UInt8) throws -> T) rethrows -> [T]
Added DispatchData.starts<PossiblePrefix where PossiblePrefix : Sequence, PossiblePrefix.Iterator.Element == UInt8>(with: PossiblePrefix) -> Bool
Added DispatchData.starts<PossiblePrefix where PossiblePrefix : Sequence, PossiblePrefix.Iterator.Element == UInt8>(with: PossiblePrefix, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchData.subdata(in: CountableRange<DispatchData.Index>) -> DispatchData
Added DispatchData.subscript(_: CountableClosedRange<Int>) -> RandomAccessSlice<DispatchData>
Added DispatchData.subscript(_: ClosedRange<Int>) -> RandomAccessSlice<DispatchData>
Added DispatchData.subscript(_: Range<Int>) -> RandomAccessSlice<DispatchData>
Added DispatchData.subscript(_: CountableRange<Int>) -> RandomAccessSlice<DispatchData>
Added DispatchData.subscript(_: Range<Int>) -> RandomAccessSlice<DispatchData>
Added DispatchData.underestimatedCount
Added DispatchData.underestimatedCount
Added DispatchDataIterator.elementsEqual<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence) -> Bool
Added DispatchDataIterator.elementsEqual<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchDataIterator.flatMap<SegmentOfResult : Sequence>(_: (UInt8) throws -> SegmentOfResult) rethrows -> [SegmentOfResult.Iterator.Element]
Added DispatchDataIterator.flatMap<ElementOfResult>(_: (UInt8) throws -> ElementOfResult?) rethrows -> [ElementOfResult]
Added DispatchDataIterator.lexicographicallyPrecedes<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence) -> Bool
Added DispatchDataIterator.lexicographicallyPrecedes<OtherSequence where OtherSequence : Sequence, OtherSequence.Iterator.Element == UInt8>(_: OtherSequence, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchDataIterator.starts<PossiblePrefix where PossiblePrefix : Sequence, PossiblePrefix.Iterator.Element == UInt8>(with: PossiblePrefix) -> Bool
Added DispatchDataIterator.starts<PossiblePrefix where PossiblePrefix : Sequence, PossiblePrefix.Iterator.Element == UInt8>(with: PossiblePrefix, by: (UInt8, UInt8) throws -> Bool) rethrows -> Bool
Added DispatchIO.init(type: DispatchIO.StreamType, path: UnsafePointer<Int8>, oflag: Int32, mode: mode_t, queue: DispatchQueue, cleanupHandler: (Int32) -> Swift.Void)
Added DispatchIO.CloseFlags.contains(_: DispatchIO.CloseFlags) -> Bool
Added DispatchIO.CloseFlags.init<S : Sequence where S.Iterator.Element == DispatchIO.CloseFlags>(_: S)
Added DispatchIO.CloseFlags.insert(_: DispatchIO.CloseFlags) -> (inserted: Bool, memberAfterInsert: DispatchIO.CloseFlags)
Added DispatchIO.CloseFlags.remove(_: DispatchIO.CloseFlags) -> DispatchIO.CloseFlags?
Added DispatchIO.CloseFlags.update(with: DispatchIO.CloseFlags) -> DispatchIO.CloseFlags?
Added DispatchIO.IntervalFlags.contains(_: DispatchIO.IntervalFlags) -> Bool
Added DispatchIO.IntervalFlags.init<S : Sequence where S.Iterator.Element == DispatchIO.IntervalFlags>(_: S)
Added DispatchIO.IntervalFlags.insert(_: DispatchIO.IntervalFlags) -> (inserted: Bool, memberAfterInsert: DispatchIO.IntervalFlags)
Added DispatchIO.IntervalFlags.remove(_: DispatchIO.IntervalFlags) -> DispatchIO.IntervalFlags?
Added DispatchIO.IntervalFlags.update(with: DispatchIO.IntervalFlags) -> DispatchIO.IntervalFlags?
Added DispatchQueue.setSpecific<T>(key: DispatchSpecificKey<T>, value: T)
Added DispatchQueue.Attributes.contains(_: DispatchQueue.Attributes) -> Bool
Added DispatchQueue.Attributes.init<S : Sequence where S.Iterator.Element == DispatchQueue.Attributes>(_: S)
Added DispatchQueue.Attributes.insert(_: DispatchQueue.Attributes) -> (inserted: Bool, memberAfterInsert: DispatchQueue.Attributes)
Added DispatchQueue.Attributes.remove(_: DispatchQueue.Attributes) -> DispatchQueue.Attributes?
Added DispatchQueue.Attributes.update(with: DispatchQueue.Attributes) -> DispatchQueue.Attributes?
Added DispatchSource.FileSystemEvent.contains(_: DispatchSource.FileSystemEvent) -> Bool
Added DispatchSource.FileSystemEvent.init<S : Sequence where S.Iterator.Element == DispatchSource.FileSystemEvent>(_: S)
Added DispatchSource.FileSystemEvent.insert(_: DispatchSource.FileSystemEvent) -> (inserted: Bool, memberAfterInsert: DispatchSource.FileSystemEvent)
Added DispatchSource.FileSystemEvent.remove(_: DispatchSource.FileSystemEvent) -> DispatchSource.FileSystemEvent?
Added DispatchSource.FileSystemEvent.update(with: DispatchSource.FileSystemEvent) -> DispatchSource.FileSystemEvent?
Added DispatchSource.MachSendEvent.contains(_: DispatchSource.MachSendEvent) -> Bool
Added DispatchSource.MachSendEvent.init<S : Sequence where S.Iterator.Element == DispatchSource.MachSendEvent>(_: S)
Added DispatchSource.MachSendEvent.insert(_: DispatchSource.MachSendEvent) -> (inserted: Bool, memberAfterInsert: DispatchSource.MachSendEvent)
Added DispatchSource.MachSendEvent.remove(_: DispatchSource.MachSendEvent) -> DispatchSource.MachSendEvent?
Added DispatchSource.MachSendEvent.update(with: DispatchSource.MachSendEvent) -> DispatchSource.MachSendEvent?
Added DispatchSource.MemoryPressureEvent.contains(_: DispatchSource.MemoryPressureEvent) -> Bool
Added DispatchSource.MemoryPressureEvent.init<S : Sequence where S.Iterator.Element == DispatchSource.MemoryPressureEvent>(_: S)
Added DispatchSource.MemoryPressureEvent.insert(_: DispatchSource.MemoryPressureEvent) -> (inserted: Bool, memberAfterInsert: DispatchSource.MemoryPressureEvent)
Added DispatchSource.MemoryPressureEvent.remove(_: DispatchSource.MemoryPressureEvent) -> DispatchSource.MemoryPressureEvent?
Added DispatchSource.MemoryPressureEvent.update(with: DispatchSource.MemoryPressureEvent) -> DispatchSource.MemoryPressureEvent?
Added DispatchSource.ProcessEvent.contains(_: DispatchSource.ProcessEvent) -> Bool
Added DispatchSource.ProcessEvent.init<S : Sequence where S.Iterator.Element == DispatchSource.ProcessEvent>(_: S)
Added DispatchSource.ProcessEvent.insert(_: DispatchSource.ProcessEvent) -> (inserted: Bool, memberAfterInsert: DispatchSource.ProcessEvent)
Added DispatchSource.ProcessEvent.remove(_: DispatchSource.ProcessEvent) -> DispatchSource.ProcessEvent?
Added DispatchSource.ProcessEvent.update(with: DispatchSource.ProcessEvent) -> DispatchSource.ProcessEvent?
Added DispatchSource.TimerFlags.contains(_: DispatchSource.TimerFlags) -> Bool
Added DispatchSource.TimerFlags.init<S : Sequence where S.Iterator.Element == DispatchSource.TimerFlags>(_: S)
Added DispatchSource.TimerFlags.insert(_: DispatchSource.TimerFlags) -> (inserted: Bool, memberAfterInsert: DispatchSource.TimerFlags)
Added DispatchSource.TimerFlags.remove(_: DispatchSource.TimerFlags) -> DispatchSource.TimerFlags?
Added DispatchSource.TimerFlags.update(with: DispatchSource.TimerFlags) -> DispatchSource.TimerFlags?
Added DispatchSourceProtocol.setCancelHandler(qos: DispatchQoS, flags: DispatchWorkItemFlags, handler: DispatchSourceProtocol.DispatchSourceHandler?)
Added DispatchSourceProtocol.setEventHandler(qos: DispatchQoS, flags: DispatchWorkItemFlags, handler: DispatchSourceProtocol.DispatchSourceHandler?)
Added DispatchSourceProtocol.setRegistrationHandler(qos: DispatchQoS, flags: DispatchWorkItemFlags, handler: DispatchSourceProtocol.DispatchSourceHandler?)
Added DispatchWorkItemFlags.contains(_: DispatchWorkItemFlags) -> Bool
Added DispatchWorkItemFlags.init<S : Sequence where S.Iterator.Element == DispatchWorkItemFlags>(_: S)
Added DispatchWorkItemFlags.insert(_: DispatchWorkItemFlags) -> (inserted: Bool, memberAfterInsert: DispatchWorkItemFlags)
Added DispatchWorkItemFlags.remove(_: DispatchWorkItemFlags) -> DispatchWorkItemFlags?
Added DispatchWorkItemFlags.update(with: DispatchWorkItemFlags) -> DispatchWorkItemFlags?
Added <(_: DispatchWallTime, _: DispatchWallTime) -> Bool
Added <(_: DispatchTime, _: DispatchTime) -> Bool
Added ==(_: DispatchQoS, _: DispatchQoS) -> Bool
Added ==(_: DispatchWallTime, _: DispatchWallTime) -> Bool
Added ==(_: DispatchTime, _: DispatchTime) -> Bool
NameDeclaration
Fromdispatch_group_enter(_:)
func dispatch_group_enter(_ group: dispatch_group_t)
Toenter()
func enter()

NameDeclarationIntroduction
Fromdispatch_group_create()
@warn_unused_result
func dispatch_group_create() -> dispatch_group_t!
tvOS 9.0
Toinit()
init()
tvOS 10.0

NameDeclaration
Fromdispatch_group_leave(_:)
func dispatch_group_leave(_ group: dispatch_group_t)
Toleave()
func leave()

NameDeclaration
Fromdispatch_io_barrier(_:_:)
func dispatch_io_barrier(_ channel: dispatch_io_t, _ barrier: dispatch_block_t)
Tobarrier(execute:)
func barrier(execute barrier: @escaping () -> Swift.Void)

NameDeclarationReadonly
Fromdispatch_io_get_descriptor(_:)
@warn_unused_result
func dispatch_io_get_descriptor(_ channel: dispatch_io_t) -> dispatch_fd_t
--
TofileDescriptor
var fileDescriptor: Int32 { get }
yes

NameDeclaration
Fromdispatch_io_create(_:_:_:_:)
@warn_unused_result
func dispatch_io_create(_ type: dispatch_io_type_t, _ fd: dispatch_fd_t, _ queue: dispatch_queue_t!, _ cleanup_handler: ((Int32) -> Void)!) -> dispatch_io_t!
Toinit(__type:fd:queue:handler:)
init(__type type: UInt, fd fd: Int32, queue queue: DispatchQueue, handler cleanup_handler: @escaping (Int32) -> Swift.Void)

NameDeclaration
Fromdispatch_io_create_with_io(_:_:_:_:)
@warn_unused_result
func dispatch_io_create_with_io(_ type: dispatch_io_type_t, _ io: dispatch_io_t, _ queue: dispatch_queue_t!, _ cleanup_handler: ((Int32) -> Void)!) -> dispatch_io_t!
Toinit(__type:io:queue:handler:)
init(__type type: UInt, io io: DispatchIO, queue queue: DispatchQueue, handler cleanup_handler: @escaping (Int32) -> Swift.Void)

NameDeclaration
Fromdispatch_io_create_with_path(_:_:_:_:_:_:)
@warn_unused_result
func dispatch_io_create_with_path(_ type: dispatch_io_type_t, _ path: UnsafePointer<Int8>, _ oflag: Int32, _ mode: mode_t, _ queue: dispatch_queue_t!, _ cleanup_handler: ((Int32) -> Void)!) -> dispatch_io_t!
Toinit(__type:path:oflag:mode:queue:handler:)
init(__type type: UInt, path path: UnsafePointer<Int8>, oflag oflag: Int32, mode mode: mode_t, queue queue: DispatchQueue, handler cleanup_handler: @escaping (Int32) -> Swift.Void)

NameDeclaration
Fromdispatch_io_set_high_water(_:_:)
func dispatch_io_set_high_water(_ channel: dispatch_io_t, _ high_water: Int)
TosetLimit(highWater:)
func setLimit(highWater high_water: Int)

NameDeclaration
Fromdispatch_io_set_low_water(_:_:)
func dispatch_io_set_low_water(_ channel: dispatch_io_t, _ low_water: Int)
TosetLimit(lowWater:)
func setLimit(lowWater low_water: Int)

NameDeclaration
Fromdispatch_resume(_:)
func dispatch_resume(_ object: dispatch_object_t)
Toresume()
func resume()

NameDeclaration
Fromdispatch_set_target_queue(_:_:)
func dispatch_set_target_queue(_ object: dispatch_object_t!, _ queue: dispatch_queue_t!)
TosetTarget(queue:)
func setTarget(queue queue: DispatchQueue?)

NameDeclaration
Fromdispatch_suspend(_:)
func dispatch_suspend(_ object: dispatch_object_t)
Tosuspend()
func suspend()

NameDeclaration
Fromdispatch_queue_create(_:_:)
@warn_unused_result
func dispatch_queue_create(_ label: UnsafePointer<Int8>, _ attr: dispatch_queue_attr_t!) -> dispatch_queue_t!
Toinit(__label:attr:)
init(__label label: UnsafePointer<Int8>?, attr attr: __OS_dispatch_queue_attr?)

NameDeclaration
Fromdispatch_sync(_:_:)
func dispatch_sync(_ queue: dispatch_queue_t, _ block: dispatch_block_t)
Tosync(execute:)
func sync(execute block: () -> Swift.Void)

NameDeclaration
Fromdispatch_semaphore_create(_:)
@warn_unused_result
func dispatch_semaphore_create(_ value: Int) -> dispatch_semaphore_t!
Toinit(value:)
init(value value: Int)

DeclarationProtocols
From
protocol OS_dispatch_source : OS_dispatch_object {
}
OS_dispatch_object
To
protocol DispatchSourceProtocol : NSObjectProtocol {
}
NSObjectProtocol

Declaration
From
@noreturn func dispatch_main()
To
func dispatchMain() -> Never