kotlinx.coroutines icon indicating copy to clipboard operation
kotlinx.coroutines copied to clipboard

Extend the KDoc for `CoroutineStart`

Open globsterg opened this issue 1 year ago • 1 comments
trafficstars

One of the pieces of #4133.

@fzhinkin, could you take a look?

globsterg avatar Jun 02 '24 13:06 globsterg

By the way, here is our samples guide, might be useful: https://github.com/Kotlin/api-guidelines/blob/main/team_docs/samples.md

qwwdfsad avatar Jun 27 '24 10:06 qwwdfsad

Seeing this demoted to a draft, is it correct that we are waiting for your next updates?

qwwdfsad avatar Jul 08 '24 09:07 qwwdfsad

Seeing this demoted to a draft, is it correct that we are waiting for your next updates?

The idea was to do this:

If at any point you'll decide that it's enough -- no worries. Feel free to open a draft PR, let us know, and we'll handle it from there

(The quote is from https://github.com/Kotlin/kotlinx.coroutines/issues/4133#issuecomment-2133172830)

globsterg avatar Jul 09 '24 06:07 globsterg

Thanks for the reminder. We'll take it from here in that case!

Thanks for the bootstrapping work and revamp! 👍

qwwdfsad avatar Jul 10 '24 12:07 qwwdfsad

Just one question re. idiomatic-ness of by lazy over lazy-start: Is code like this a concern? It does make sense with the sematics of lazy, but it's unclear to me if that's also what one might expect when reading such code for the first time.

val work by lazy { scope.async { println("Running!"); 5 } }
work.invokeOnCompletion { // this access will start the coroutine
    println("Completed!")
}
delay(5000)
println(work.await())

SebastianAigner avatar Aug 02 '24 15:08 SebastianAigner

I'm not sure how realistic this concern is, but adding a line of text to warn people about it surely can't hurt. Done.

dkhalanskyjb avatar Aug 05 '24 11:08 dkhalanskyjb