What is `cancelBoundary()` (in the last example of...
# arrow
c
What is
cancelBoundary()
(in the last example of https://arrow-kt.io/docs/integrations/kotlinxcoroutines/) ?
a
it refers to this section in the Quickstart Guide https://arrow-kt.io/docs/fx/async/#cancellation
s
@CLOVIS it's like
coroutineContext.ensureActive()
and is being deprecated towards it with the new underlying KotlinX runtime. It's basically to mark a point of cancellation, so if your suspending code gets cancelled it will stop running at the first
cancelBoundary()
it encounters.
☝️ 1
c
Thanks :)