Thread
#feed
    s

    Shailesh Sengar

    3 years ago
    Folks, i wrote an article on Kotlin Coroutine Scope: https://medium.com/@shaileshsengar21/kotlin-coroutine-scopes-377219274461 I would appreciate feedback. Thanks.
    Dico

    Dico

    3 years ago
    I think theres a bit of an error relating to the part where you list different scopes. Specifically ProducerScope and ActorScope. I believe you are referring to different coroutine builders in the explanation for these. The scope can't determine what coroutine builder should be used. Not trying to be rude, correct me if I'm wrong, but I believe these symbols do not exist.
    b

    bdawg.io

    3 years ago
    ActorScope
    and
    ProducerScope
    are interfaces of a standard
    CoroutineScope
    that also has reference to an open
    Channel
    . It could be misleading to even mention them since they have no special behavior in terms of Coroutine Scopes.
    Dico

    Dico

    3 years ago
    Oh, I didn't know, but that makes sense.
    s

    Shailesh Sengar

    3 years ago
    Bradyn is right,
    ActorScope
    is interface of
    CoroutineScope
    +
    ReceiveChannel
    and
    ProducerScope
    is interface of
    CoroutineScope
    +
    SendChannel
    . Both can be use in Coroutine channel. ProducerScope is scope for produce coroutine builder (https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/produce.html). Also ActorScope is scope for Actor coroutine builder (https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html) I didn’t explain channel in this article because
    Channel
    is not stable yet. Thanks for the feedback.