to-elixir
03/14/2023, 3:33 AMVampire
03/14/2023, 3:37 AMto-elixir
03/14/2023, 3:38 AMVampire
03/14/2023, 3:40 AMto-elixir
03/14/2023, 3:46 AMephemient
03/14/2023, 4:09 AMephemient
03/14/2023, 4:10 AMLandry Norris
03/14/2023, 1:25 PMephemient
03/14/2023, 2:58 PMusePinned
instead of manually pinning and unpinningLandry Norris
03/14/2023, 3:00 PMephemient
03/14/2023, 4:47 PMLandry Norris
03/14/2023, 5:16 PMephemient
03/14/2023, 5:31 PMsuspendCoroutine
, and then usePinned
would work across itephemient
03/14/2023, 5:32 PMvalue.usePinned { pinned ->
suspendCoroutine { cont ->
someCFunctionWithCallback(
staticCFunction { pinned, etc -> cont.resume(pinned.get() to etc) },
pinned,
...or something along those linesLandry Norris
03/14/2023, 5:32 PMLandry Norris
03/14/2023, 5:34 PMephemient
03/14/2023, 5:35 PMLandry Norris
03/14/2023, 5:37 PMephemient
03/14/2023, 5:38 PMPair(value, cont)
right?Landry Norris
03/14/2023, 5:38 PMephemient
03/14/2023, 5:39 PMusePinned
inside the suspendCoroutine
block doesn't helpLandry Norris
03/14/2023, 5:40 PMephemient
03/14/2023, 5:41 PMstaticCFunction
, where you want N
overloads each with different number of parameters for convenienceLandry Norris
03/14/2023, 5:46 PMLandry Norris
03/14/2023, 5:48 PMephemient
03/14/2023, 5:50 PM