File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,23 @@ public class DispatchWorkItem {
40
40
internal var _block : _DispatchBlock
41
41
42
42
public init ( qos: DispatchQoS = . unspecified, flags: DispatchWorkItemFlags = [ ] , block: @escaping @convention ( block) ( ) -> ( ) ) {
43
+ #if os(Windows) && (arch(arm64) || arch(x86_64))
44
+ let flags = dispatch_block_flags_t ( UInt32 ( flags. rawValue) )
45
+ #else
43
46
let flags : dispatch_block_flags_t = numericCast ( flags. rawValue)
47
+ #endif
44
48
_block = dispatch_block_create_with_qos_class ( flags,
45
49
qos. qosClass. rawValue. rawValue, Int32 ( qos. relativePriority) , block)
46
50
}
47
51
48
52
// Used by DispatchQueue.synchronously<T> to provide a path through
49
53
// dispatch_block_t, as we know the lifetime of the block in question.
50
54
internal init ( flags: DispatchWorkItemFlags = [ ] , noescapeBlock: ( ) -> ( ) ) {
55
+ #if os(Windows) && (arch(arm64) || arch(x86_64))
56
+ let flags = dispatch_block_flags_t ( UInt32 ( flags. rawValue) )
57
+ #else
51
58
let flags : dispatch_block_flags_t = numericCast ( flags. rawValue)
59
+ #endif
52
60
_block = _swift_dispatch_block_create_noescape ( flags, noescapeBlock)
53
61
}
54
62
You can’t perform that action at this time.
0 commit comments