Is it possible to do cooperative cancellation with...
# coroutines
n
Is it possible to do cooperative cancellation with just the standard lib? I know kotlinx.coroutines offers APIs for this. But I’m wondering if there’s basic support in the standard lib directly. I haven’t seen anything so far. I’m trying to avoid using kotlinx if possible due to JS bundle size concerns.
o
no, the stdlib doesn't have any of the structured concurrency stuff, or any dispatchers, cancellation, etc. You can obviously rebuild it, but you're likely to make many more mistakes than using the kotlinx coroutines libs
all the stdlib provides is the
Continuation
,
CoroutineContext
, and the interceptor framework