Michael Marth
12/22/2019, 5:08 PMPromise
to mimic the view model lifecycle callback (as described at the end of the post):
val endPromise: Promise<ForIO, Unit> = Promise.unsafeUncancelable(IO.async()).fix()
simply does not compile.
Same for
endPromise.complete(Unit).unsafeRunAsync { }
accordigly.
fix()
/ unsafeRunAsync
are simply not availble on the Promise
instance. Any ideas?Jannis
12/22/2019, 5:20 PMcomplete
returns Kind<ForIO, Unit>
afaik and I think you need endPromise.complete(Unit).fix().unsafeRunAsync {}
fix()
in this case comes from Kind<ForIO, Unit>.fix(): IO<Unit>
Michael Marth
12/22/2019, 5:29 PMJannis
12/22/2019, 5:50 PMMichael Marth
12/22/2019, 6:39 PMJannis
12/22/2019, 6:55 PM