From b98bacd94accdd0c096a44f897809f7f802aff40 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 7 Sep 2020 15:14:04 +0200 Subject: [PATCH] Fixed running code async --- .../BankingiOSApp/fints4k/DispatchQueueAsyncRunner.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/fints4k/DispatchQueueAsyncRunner.swift b/ui/BankingiOSApp/BankingiOSApp/fints4k/DispatchQueueAsyncRunner.swift index ee23ccdd..cddb8a93 100644 --- a/ui/BankingiOSApp/BankingiOSApp/fints4k/DispatchQueueAsyncRunner.swift +++ b/ui/BankingiOSApp/BankingiOSApp/fints4k/DispatchQueueAsyncRunner.swift @@ -6,11 +6,7 @@ import BankingUiSwift class DispatchQueueAsyncRunner : IAsyncRunner { func runAsync(runnable: @escaping () -> Void) { - let frozen = FreezerKt.freeze(obj: runnable) - - runnable() - - DispatchQueue(label: "DispatchQueueAsyncRunner", qos: .background).async { + DispatchQueue.main.async { // we cannot run runnable on a background thread due to Kotlin Native's memory model (that objects dispatched to other threads have to be immutable) runnable() } }