Alexander Vtyurin
06/26/2019, 7:27 PMsuspendCancelableCoroutine
a part of the language instead of suspendCoroutine
as a more general and tweakable language unit.elizarov
06/26/2019, 8:15 PMsuspendCancellableCoroutine
would mean adding Job
and all it cancellation machinery which contains quite a lot of code. That is too much for our vision of Kotlin standard library. Moreover, while the contract are quite stable since kotlinx.coroutines
version 1.0
we are still evolving implementation details considerably.Alexander Vtyurin
06/26/2019, 9:01 PMsuspendCoroutine
keeping a way to integrate with it from kotlinx.coroutines
simple? Like, I have a small pet project and I don't want to pull whole coroutines with me, I only want an ability to cancel it.louiscad
06/26/2019, 9:16 PMsimon.vergauwen
06/26/2019, 10:23 PMWhy don't you want to "pull whole kotlinx.coroutines" in that project exactly?AFAIK the reason for separation std and kotlinx was so that you didn't have to rely on kotlinx and can simple rely on std.
suspendCancelableContinuation
(and startCancelableContinuation
?) can't be separated from Job
or other kotlinx implementation details? Or could it be separated by other abstractions?gildor
06/27/2019, 2:41 AMraulraja
06/27/2019, 3:39 AMgildor
06/27/2019, 3:50 AMelizarov
06/27/2019, 7:07 AMgildor
06/27/2019, 7:32 AMsimon.vergauwen
06/27/2019, 7:33 AMAlexander Vtyurin
06/27/2019, 10:51 AMstd
weight a couple of kilos more, but anyway, I think that it is more correct for suspendCancelableCoroutine
to be a part of a language because without it no one can implement their own com.username.kotlin-coroutines
that will be compatible with kotlinx
at least in some way. Especially in a case when Job
impl is complex and should not be touched without knowledge.gildor
06/27/2019, 10:54 AMAlexander Vtyurin
06/27/2019, 10:58 AMUnfortunately, addingSo, you're saying that JB team is not sure for currentwould mean addingsuspendCancellableCoroutine
and all it cancellation machinery which contains quite a lot of code.Job
Job
impl and there are risks in this decision if sometime later you'll decide to reimplement it?gildor
06/27/2019, 11:01 AMsimon.vergauwen
06/27/2019, 11:01 AMsuspendCancelableContinuation
should be decoupled from Job
.gildor
06/27/2019, 11:01 AMAnd how would it work?should be decoupled fromsuspendCancelableContinuation
.Job
simon.vergauwen
06/27/2019, 11:02 AMJob
currently leaks kotlinx detailsgildor
06/27/2019, 11:02 AMsimon.vergauwen
06/27/2019, 11:06 AMgildor
06/27/2019, 11:07 AMsimon.vergauwen
06/27/2019, 11:07 AMgildor
06/27/2019, 11:08 AMsimon.vergauwen
06/27/2019, 11:09 AMgildor
06/27/2019, 11:09 AMsimon.vergauwen
06/27/2019, 11:09 AMgildor
06/27/2019, 11:10 AMsimon.vergauwen
06/27/2019, 11:10 AMgildor
06/27/2019, 11:10 AMsimon.vergauwen
06/27/2019, 11:11 AMstartCoroutine
suspendCancelableContinuation
we could integrate IOs cancelation in an interopt waygildor
06/27/2019, 11:26 AMsimon.vergauwen
06/27/2019, 11:27 AMsuspendCancelableContinuation
not enough?startCoroutineCancelable
if that's what you mean.gildor
06/27/2019, 11:28 AMsimon.vergauwen
06/27/2019, 11:38 AMelizarov
06/27/2019, 4:38 PMkotlinx.coroutines
it would still make total sense to keep it separately. I don’t see much benefit in adding it to the stdlib, whoever needs it can easily add a dependency.simon.vergauwen
06/27/2019, 4:42 PMsuspend
as a language feature as a result imo.elizarov
06/27/2019, 4:43 PMsimon.vergauwen
06/27/2019, 4:46 PMelizarov
06/27/2019, 4:47 PMsimon.vergauwen
06/27/2019, 4:47 PMelizarov
06/27/2019, 4:48 PMsimon.vergauwen
06/27/2019, 4:55 PMlouiscad
06/27/2019, 5:22 PMsimon.vergauwen
06/27/2019, 5:35 PM