13
13
import CDispatch
14
14
import _SwiftDispatchOverlayShims
15
15
16
- public extension DispatchSourceProtocol {
16
+ extension DispatchSourceProtocol {
17
17
18
18
public func setEventHandler( qos: DispatchQoS = . unspecified, flags: DispatchWorkItemFlags = [ ] , handler: DispatchSourceHandler ? ) {
19
19
if #available( macOS 10 . 10 , iOS 8 . 0 , * ) , let h = handler, qos != . unspecified || !flags. isEmpty {
@@ -91,7 +91,7 @@ public extension DispatchSourceProtocol {
91
91
}
92
92
}
93
93
94
- public extension DispatchSource {
94
+ extension DispatchSource {
95
95
#if HAVE_MACH
96
96
public struct MachSendEvent : OptionSet , RawRepresentable {
97
97
public let rawValue : UInt
@@ -222,7 +222,7 @@ public extension DispatchSource {
222
222
}
223
223
224
224
#if HAVE_MACH
225
- public extension DispatchSourceMachSend {
225
+ extension DispatchSourceMachSend {
226
226
public var handle : mach_port_t {
227
227
return mach_port_t ( dispatch_source_get_handle ( self as! DispatchSource ) )
228
228
}
@@ -240,15 +240,15 @@ public extension DispatchSourceMachSend {
240
240
#endif
241
241
242
242
#if HAVE_MACH
243
- public extension DispatchSourceMachReceive {
243
+ extension DispatchSourceMachReceive {
244
244
public var handle : mach_port_t {
245
245
return mach_port_t ( dispatch_source_get_handle ( self as! DispatchSource ) )
246
246
}
247
247
}
248
248
#endif
249
249
250
250
#if HAVE_MACH
251
- public extension DispatchSourceMemoryPressure {
251
+ extension DispatchSourceMemoryPressure {
252
252
public var data : DispatchSource . MemoryPressureEvent {
253
253
let data = dispatch_source_get_data ( self as! DispatchSource )
254
254
return DispatchSource . MemoryPressureEvent ( rawValue: data)
@@ -262,7 +262,7 @@ public extension DispatchSourceMemoryPressure {
262
262
#endif
263
263
264
264
#if !os(Linux) && !os(Android)
265
- public extension DispatchSourceProcess {
265
+ extension DispatchSourceProcess {
266
266
public var handle : pid_t {
267
267
return pid_t ( dispatch_source_get_handle ( self as! DispatchSource ) )
268
268
}
@@ -277,7 +277,7 @@ public extension DispatchSourceProcess {
277
277
}
278
278
#endif
279
279
280
- public extension DispatchSourceTimer {
280
+ extension DispatchSourceTimer {
281
281
///
282
282
/// Sets the deadline and leeway for a timer event that fires once.
283
283
///
@@ -618,7 +618,7 @@ public extension DispatchSourceTimer {
618
618
}
619
619
620
620
#if !os(Linux) && !os(Android)
621
- public extension DispatchSourceFileSystemObject {
621
+ extension DispatchSourceFileSystemObject {
622
622
public var handle : Int32 {
623
623
return Int32 ( dispatch_source_get_handle ( ( self as! DispatchSource ) . __wrapped) )
624
624
}
@@ -635,7 +635,7 @@ public extension DispatchSourceFileSystemObject {
635
635
}
636
636
#endif
637
637
638
- public extension DispatchSourceUserDataAdd {
638
+ extension DispatchSourceUserDataAdd {
639
639
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_ADD`
640
640
/// and submits its event handler block to its target queue.
641
641
///
@@ -646,7 +646,7 @@ public extension DispatchSourceUserDataAdd {
646
646
}
647
647
}
648
648
649
- public extension DispatchSourceUserDataOr {
649
+ extension DispatchSourceUserDataOr {
650
650
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_OR` and
651
651
/// submits its event handler block to its target queue.
652
652
///
@@ -657,7 +657,7 @@ public extension DispatchSourceUserDataOr {
657
657
}
658
658
}
659
659
660
- public extension DispatchSourceUserDataReplace {
660
+ extension DispatchSourceUserDataReplace {
661
661
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_REPLACE`
662
662
/// and submits its event handler block to its target queue.
663
663
///
0 commit comments