Skip to content

Commit 7427aa5

Browse files
committed
[Concurrency] Remove SWIFT_ENABLE_ASYNC_JOB_DISPATCH_INTEGRATION environment variable.
This option serves no purpose anymore and this dispatch integration should always be enabled.
1 parent 135e3f2 commit 7427aa5

File tree

8 files changed

+7
-26
lines changed

8 files changed

+7
-26
lines changed

include/swift/Runtime/EnvironmentVariables.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ using string = const char *;
4545
// Concurrency library can call.
4646
SWIFT_RUNTIME_STDLIB_SPI bool concurrencyEnableCooperativeQueues();
4747

48-
// Wrapper around SWIFT_ENABLE_ASYNC_JOB_DISPATCH_INTEGRATION that the
49-
// Concurrency library can call.
50-
SWIFT_RUNTIME_STDLIB_SPI bool concurrencyEnableJobDispatchIntegration();
51-
5248
// Wrapper around SWIFT_DEBUG_VALIDATE_UNCHECKED_CONTINUATIONS that the
5349
// Concurrency library can call.
5450
SWIFT_RUNTIME_STDLIB_SPI bool concurrencyValidateUncheckedContinuations();

stdlib/public/Concurrency/DispatchGlobalExecutor.inc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,16 @@ static void initializeDispatchEnqueueFunc(dispatch_queue_t queue, void *obj,
9393

9494
// Always fall back to plain dispatch_async_f for back-deployed concurrency.
9595
#if !defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT)
96-
if (runtime::environment::concurrencyEnableJobDispatchIntegration())
9796
#if SWIFT_CONCURRENCY_HAS_DISPATCH_PRIVATE
98-
if (SWIFT_RUNTIME_WEAK_CHECK(dispatch_async_swift_job))
99-
func = SWIFT_RUNTIME_WEAK_USE(dispatch_async_swift_job);
97+
if (SWIFT_RUNTIME_WEAK_CHECK(dispatch_async_swift_job))
98+
func = SWIFT_RUNTIME_WEAK_USE(dispatch_async_swift_job);
10099
#elif defined(_WIN32)
101-
func = reinterpret_cast<dispatchEnqueueFuncType>(
102-
GetProcAddress(LoadLibraryW(L"dispatch.dll"),
103-
"dispatch_async_swift_job"));
100+
func = reinterpret_cast<dispatchEnqueueFuncType>(
101+
GetProcAddress(LoadLibraryW(L"dispatch.dll"),
102+
"dispatch_async_swift_job"));
104103
#else
105-
func = reinterpret_cast<dispatchEnqueueFuncType>(
106-
dlsym(RTLD_NEXT, "dispatch_async_swift_job"));
107-
104+
func = reinterpret_cast<dispatchEnqueueFuncType>(
105+
dlsym(RTLD_NEXT, "dispatch_async_swift_job"));
108106
#endif
109107
#endif
110108

stdlib/public/runtime/EnvironmentVariables.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,6 @@ SWIFT_RUNTIME_STDLIB_SPI bool concurrencyEnableCooperativeQueues() {
263263
SWIFT_DEBUG_CONCURRENCY_ENABLE_COOPERATIVE_QUEUES();
264264
}
265265

266-
267-
SWIFT_RUNTIME_STDLIB_SPI bool concurrencyEnableJobDispatchIntegration() {
268-
return runtime::environment::
269-
SWIFT_ENABLE_ASYNC_JOB_DISPATCH_INTEGRATION();
270-
}
271-
272266
SWIFT_RUNTIME_STDLIB_SPI bool concurrencyValidateUncheckedContinuations() {
273267
return runtime::environment::SWIFT_DEBUG_VALIDATE_UNCHECKED_CONTINUATIONS();
274268
}

stdlib/public/runtime/EnvironmentVariables.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ VARIABLE(SWIFT_DEBUG_ENABLE_MALLOC_SCRIBBLE, bool, false,
4747
VARIABLE(SWIFT_DEBUG_ENABLE_COW_CHECKS, bool, false,
4848
"Enable internal checks for copy-on-write operations.")
4949

50-
VARIABLE(SWIFT_ENABLE_ASYNC_JOB_DISPATCH_INTEGRATION, bool, true,
51-
"Enable use of dispatch_async_swift_job when available.")
52-
5350
VARIABLE(SWIFT_DEBUG_VALIDATE_UNCHECKED_CONTINUATIONS, bool, false,
5451
"Check for and error on double-calls of unchecked continuations.")
5552

test/abi/Inputs/macOS/arm64/stdlib/baseline

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13463,7 +13463,6 @@ __swift_tsan_enabled
1346313463
__swift_tsan_release
1346413464
__swift_willThrow
1346513465
_concurrencyEnableCooperativeQueues
13466-
_concurrencyEnableJobDispatchIntegration
1346713466
_concurrencyValidateUncheckedContinuations
1346813467
_swift_COWChecksEnabled
1346913468
_swift_EnumCaseName

test/abi/Inputs/macOS/arm64/stdlib/baseline-asserts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13558,7 +13558,6 @@ __swift_tsan_enabled
1355813558
__swift_tsan_release
1355913559
__swift_willThrow
1356013560
_concurrencyEnableCooperativeQueues
13561-
_concurrencyEnableJobDispatchIntegration
1356213561
_concurrencyValidateUncheckedContinuations
1356313562
_swift_COWChecksEnabled
1356413563
_swift_EnumCaseName

test/abi/Inputs/macOS/x86_64/stdlib/baseline

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13421,7 +13421,6 @@ __swift_tsan_enabled
1342113421
__swift_tsan_release
1342213422
__swift_willThrow
1342313423
_concurrencyEnableCooperativeQueues
13424-
_concurrencyEnableJobDispatchIntegration
1342513424
_concurrencyValidateUncheckedContinuations
1342613425
_swift_COWChecksEnabled
1342713426
_swift_EnumCaseName

test/abi/Inputs/macOS/x86_64/stdlib/baseline-asserts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13516,7 +13516,6 @@ __swift_tsan_enabled
1351613516
__swift_tsan_release
1351713517
__swift_willThrow
1351813518
_concurrencyEnableCooperativeQueues
13519-
_concurrencyEnableJobDispatchIntegration
1352013519
_concurrencyValidateUncheckedContinuations
1352113520
_swift_COWChecksEnabled
1352213521
_swift_EnumCaseName

0 commit comments

Comments
 (0)