[concurrency] Move tsan_release to point before task gets destroyed

rdar://152501929
This commit is contained in:
Dan Blackwell
2025-06-10 19:35:46 +01:00
parent 0839675e6d
commit e78838ccca
2 changed files with 2 additions and 2 deletions

View File

@@ -256,8 +256,6 @@ void swift::runJobInEstablishedExecutorContext(Job *job) {
#if SWIFT_OBJC_INTEROP
objc_autoreleasePoolPop(pool);
#endif
_swift_tsan_release(job);
}
void swift::adoptTaskVoucher(AsyncTask *task) {

View File

@@ -859,6 +859,8 @@ struct AsyncTask::PrivateStorage {
}
}
_swift_tsan_release(task);
// Destroy and deallocate any remaining task local items since the task is
// completed. We need to do this before we destroy the task local
// deallocator.