mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[concurrency] Move tsan_release to point before task gets destroyed
rdar://152501929
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user