[K/N] Process objc run loop on the finalizer thread ^KT-58851

Merge-request: KT-MR-11024
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
This commit is contained in:
Aleksei.Glushko
2023-07-27 14:17:48 +00:00
committed by Space Team
parent 6ac76aa3e9
commit 1eda35a59c
7 changed files with 339 additions and 24 deletions
@@ -339,7 +339,7 @@ konan::AutoreleasePool::AutoreleasePool()
: handle(objc_autoreleasePoolPush()) {}
konan::AutoreleasePool::~AutoreleasePool() {
kotlin::ThreadStateGuard guard(kotlin::ThreadState::kNative);
kotlin::ThreadStateGuard guard(kotlin::ThreadState::kNative, true);
objc_autoreleasePoolPop(handle);
}