File tree Expand file tree Collapse file tree 4 files changed +2
-281
lines changed Expand file tree Collapse file tree 4 files changed +2
-281
lines changed Original file line number Diff line number Diff line change 55
55
- name : Test
56
56
run : swift test --skip-build
57
57
58
- xcode_15_4 :
59
- runs-on : macos-14
60
- env :
61
- DEVELOPER_DIR : /Applications/Xcode_15.4.app/Contents/Developer
62
- steps :
63
- - name : Checkout
64
- uses : actions/checkout@v4
65
- - name : Version
66
- run : swift --version
67
- - name : Build
68
- run : swift build --build-tests
69
- - name : Test
70
- run : swift test --skip-build
71
-
72
- linux_swift_5_10 :
73
- runs-on : ubuntu-latest
74
- container : swift:5.10
75
- steps :
76
- - name : Checkout
77
- uses : actions/checkout@v4
78
- - name : Version
79
- run : swift --version
80
- - name : Build
81
- run : swift build --build-tests
82
- - name : Test
83
- run : swift test --skip-build
84
-
85
58
linux_swift_6_0 :
86
59
runs-on : ubuntu-latest
87
60
container : swift:6.0.3
@@ -151,15 +124,15 @@ jobs:
151
124
- name : Build
152
125
run : swift build --swift-sdk aarch64-unknown-linux-android24
153
126
154
- windows_swift_6_1 :
127
+ windows_swift_6_2 :
155
128
runs-on : windows-latest
156
129
steps :
157
130
- name : Checkout
158
131
uses : actions/checkout@v4
159
132
- name : Install Swift
160
133
uses : SwiftyLab/setup-swift@latest
161
134
with :
162
- swift-version : " 6.1.2 "
135
+ swift-version : " 6.2.0 "
163
136
visual-studio-components : Microsoft.VisualStudio.Component.Windows11SDK.22621
164
137
- name : Version
165
138
run : swift --version
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 29
29
// SOFTWARE.
30
30
//
31
31
32
- #if compiler(>=6)
33
-
34
- #if !canImport(WinSDK)
35
-
36
32
// Backports the Swift 6 type Mutex<Value> to all Darwin platforms
37
33
@usableFromInline
38
34
struct Mutex < Value: ~ Copyable> : ~ Copyable {
@@ -64,40 +60,6 @@ struct Mutex<Value: ~Copyable>: ~Copyable {
64
60
65
61
extension Mutex : @unchecked Sendable where Value: ~ Copyable { }
66
62
67
- #else
68
-
69
- // Windows doesn't support ~Copyable yet
70
-
71
- @usableFromInline
72
- struct Mutex < Value> : @unchecked Sendable {
73
- let storage : Storage < Value >
74
-
75
- @usableFromInline
76
- init ( _ initialValue: consuming sending Value) {
77
- self . storage = Storage ( initialValue)
78
- }
79
-
80
- @usableFromInline
81
- borrowing func withLock< Result, E: Error > (
82
- _ body: ( inout sending Value) throws ( E ) -> sending Result
83
- ) throws ( E) -> sending Result {
84
- storage. lock ( )
85
- defer { storage. unlock ( ) }
86
- return try body ( & storage. value)
87
- }
88
-
89
- @usableFromInline
90
- borrowing func withLockIfAvailable< Result, E: Error > (
91
- _ body: ( inout sending Value) throws ( E ) -> sending Result
92
- ) throws ( E) -> sending Result? {
93
- guard storage. tryLock ( ) else { return nil }
94
- defer { storage. unlock ( ) }
95
- return try body ( & storage. value)
96
- }
97
- }
98
-
99
- #endif
100
-
101
63
#if canImport(Darwin)
102
64
103
65
import struct os. os_unfair_lock_t
@@ -209,5 +171,3 @@ final class Storage<Value> {
209
171
}
210
172
211
173
#endif
212
-
213
- #endif
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments