Skip to content

Commit 1366d7e

Browse files
committed
Account for back-deployed concurrency library
The back-deployed concurrency library, which is used on OS versions prior to the introduction of concurrency, has a Swift 5.6-era concurrency library that supports vouchers.
1 parent c90d822 commit 1366d7e

File tree

1 file changed

+6
-1
lines changed
  • stdlib/toolchain/Compatibility56/Concurrency

1 file changed

+6
-1
lines changed

stdlib/toolchain/Compatibility56/Concurrency/Actor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,14 @@ static bool vouchersDisabled;
152152

153153
static void _initializeVouchersDisabled(void *ctxt) {
154154
if (__builtin_available(macOS 12.1, iOS 15.2, tvOS 15.2, watchOS 8.3, *)) {
155+
// Concurrency library in the OS in new enough that it has voucher support.
155156
vouchersDisabled = false;
156-
} else {
157+
} else if (__builtin_available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)) {
158+
// Concurrency library in the OS falls in the range that has no voucher support.
157159
vouchersDisabled = true;
160+
} else {
161+
// Concurrency library is back-deployed on this OS, and has voucher support.
162+
vouchersDisabled = false;
158163
}
159164
}
160165

0 commit comments

Comments
 (0)