for my HttpClient. In normal conditions it works fine, but in a CoroutineWorker context I get
kotlin.native.concurrent.FreezingException: freezing of InvokeOnCompletion@e9e588[job@149d2c8] has failed, first blocker is BlockingCoroutine{Completing}@e5b248
Because it's not production ready I can't really use the new memory model yet. So I need to solve it with the old one and CoroutineWorker.
How do I need to wrap my KTor HttpClient calls?
✅ 1
e
e5l
06/13/2022, 3:22 PM
Hi @Stefan Oltmann, could you try it with 2.0.2 and new memory model? It should be fixed
s
Stefan Oltmann
06/13/2022, 7:56 PM
@e5l That would not help me. The new memory model is not production ready right now. I need a solution for the old memory model.
Stefan Oltmann
06/13/2022, 8:05 PM
Reading trough the issues on GitHub it looks like that KTor 1.x is incompatible with CoroutinesWorker. So there is no way for me to get that working. Is that correct?
e
e5l
06/14/2022, 5:59 AM
Yep, there is an issue with old memory model so it’s unsafe to execute NSUrlRequest callbacks on arbitrary thread. It’s explicitly disabled with old memory model
s
Stefan Oltmann
06/14/2022, 6:17 AM
Thank you! That was the clear answer I was looking for.