Skip to content

Commit bd451f9

Browse files
committed
Remove the hooking for swift_task_getCurrent().
This is very performance-sensitive and unreasonable to change.
1 parent 0d5fd0f commit bd451f9

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

stdlib/public/CompatibilityOverride/CompatibilityOverrideConcurrency.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ OVERRIDE_ACTOR(job_run, void,
7878
swift::, (class Job *job, ExecutorRef executor),
7979
(job, executor))
8080

81-
OVERRIDE_ACTOR(task_getCurrent, AsyncTask *,
82-
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
83-
swift::, ,)
84-
8581
OVERRIDE_ACTOR(task_getCurrentExecutor, ExecutorRef,
8682
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
8783
swift::, ,)

stdlib/public/Concurrency/Actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ void swift::runJobInEstablishedExecutorContext(Job *job) {
254254
}
255255

256256
SWIFT_CC(swift)
257-
static AsyncTask *swift_task_getCurrentImpl() {
257+
AsyncTask *swift::swift_task_getCurrent() {
258258
return ActiveTask::get();
259259
}
260260

unittests/runtime/CompatibilityOverrideConcurrency.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_job_run) {
116116
swift_job_run(nullptr, ExecutorRef::generic());
117117
}
118118

119-
TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_getCurrent) {
120-
swift_task_getCurrent();
121-
}
122-
123119
TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_getCurrentExecutor) {
124120
swift_task_getCurrentExecutor();
125121
}

0 commit comments

Comments
 (0)