Julian Hille
05/20/2022, 8:52 AMBig Chungus
05/20/2022, 12:48 PMJulian Hille
05/23/2022, 6:38 AMBig Chungus
05/23/2022, 11:59 AMJulian Hille
05/24/2022, 11:26 AMJulian Hille
05/24/2022, 11:26 AMBig Chungus
05/24/2022, 11:27 AMBig Chungus
05/24/2022, 11:28 AMJulian Hille
05/24/2022, 11:30 AMJulian Hille
05/24/2022, 11:30 AMJulian Hille
05/24/2022, 11:31 AMBig Chungus
05/24/2022, 11:32 AMJulian Hille
05/24/2022, 11:33 AMBig Chungus
05/24/2022, 11:34 AMJulian Hille
05/24/2022, 11:34 AMBig Chungus
05/24/2022, 11:35 AMJulian Hille
05/24/2022, 11:35 AMJulian Hille
05/24/2022, 11:36 AMBig Chungus
05/24/2022, 11:36 AMBig Chungus
05/24/2022, 11:37 AMnot sure if that would work, as no suspend function is exported in the native shared or static lib
You write non_suspend kotlin functions that enter suspend scope via that custom scope and invoke appropriate fun on c behalf
Julian Hille
05/24/2022, 11:37 AMJulian Hille
05/24/2022, 11:38 AMBig Chungus
05/24/2022, 11:38 AMBig Chungus
05/24/2022, 11:39 AMBig Chungus
05/24/2022, 11:40 AMJulian Hille
05/24/2022, 11:40 AMBig Chungus
05/24/2022, 11:41 AMJulian Hille
05/24/2022, 11:42 AMBig Chungus
05/24/2022, 11:44 AMkpgalligan
05/24/2022, 1:15 PMim searching for a way to use native libs on linux, mac and windows and use suspend fun on each platformWe donāt use the suspend functions on Objc. In fact, Iām going to push for a way to suppress generating them. They arenāt really āsuspendā functions. They also wrap the suspend calls with a callback mechanism, but itās done by the compiler rather than you. If they work with Swift async/await, its because they conform to a specific convention, but they arenāt, strictly speaking, āsuspend functionsā. We generate our own interface, or suggest https://github.com/rickclephas/KMP-NativeCoroutines. That wonāt work in your case, as I assume https://github.com/rickclephas/KMP-NativeCoroutines doesnāt support linux C output (correct me if Iām wrong @Rick Clephas)
kpgalligan
05/24/2022, 1:16 PMkpgalligan
05/24/2022, 1:17 PMkpgalligan
05/24/2022, 1:22 PMJulian Hille
05/24/2022, 1:28 PMJulian Hille
05/24/2022, 1:29 PMRick Clephas
05/24/2022, 1:49 PMRick Clephas
05/24/2022, 1:50 PMIn fact, Iām going to push for a way to suppress generating them.I have actually been working on that (for ObjC/Swift): https://github.com/JetBrains/kotlin/pull/4818
Julian Hille
05/24/2022, 1:52 PMkpgalligan
05/24/2022, 3:49 PMkpgalligan
05/24/2022, 3:56 PMRick Clephas
05/24/2022, 4:03 PMkpgalligan
05/24/2022, 4:03 PM__
is new to me, but thatās great.kpgalligan
05/24/2022, 4:04 PMRick Clephas
05/24/2022, 4:05 PMRick Clephas
05/24/2022, 4:06 PMkpgalligan
05/24/2022, 4:09 PMkpgalligan
05/24/2022, 4:10 PMRick Clephas
05/24/2022, 4:12 PMRick Clephas
05/24/2022, 4:14 PMkpgalligan
05/24/2022, 4:14 PMkpgalligan
05/24/2022, 4:16 PMkpgalligan
05/24/2022, 4:17 PMRick Clephas
05/24/2022, 4:17 PMkpgalligan
05/24/2022, 4:18 PMkpgalligan
05/24/2022, 4:23 PMkpgalligan
05/24/2022, 4:24 PM