File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,6 @@ public class DispatchQueue : DispatchObject {
139
139
}
140
140
}
141
141
142
- // FIXME: the list of implemented protocols is OS dependent.
143
- // need to properly conditionalize this declaration.
144
142
public class DispatchSource : DispatchObject ,
145
143
DispatchSourceType , DispatchSourceRead ,
146
144
DispatchSourceSignal , DispatchSourceTimer ,
@@ -157,6 +155,18 @@ public class DispatchSource : DispatchObject,
157
155
}
158
156
}
159
157
158
+ #if HAVE_MACH
159
+ extension DispatchSource : DispatchSourceMachSend ,
160
+ DispatchSourceMachReceive , DispatchSourceMemoryPressure {
161
+ }
162
+ #endif
163
+
164
+ #if !os(Linux)
165
+ extension DispatchSource : DispatchSourceProcess ,
166
+ DispatchSourceFileSystemObject {
167
+ }
168
+ #endif
169
+
160
170
public protocol DispatchSourceType {
161
171
#if false // crashes the swift compiler
162
172
typealias DispatchSourceHandler = @convention ( block) ( ) -> Void
You can’t perform that action at this time.
0 commit comments