Skip to content

Commit e189f7c

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

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
@@ -245,7 +245,7 @@ void swift::runJobInEstablishedExecutorContext(Job *job) {
245245
}
246246

247247
SWIFT_CC(swift)
248-
static AsyncTask *swift_task_getCurrentImpl() {
248+
AsyncTask *swift::swift_task_getCurrent() {
249249
return ActiveTask::get();
250250
}
251251

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)