Skip to content

Flow<T>.launchNowIn(scope: CoroutineScope, context: CoroutineContext), Flow<T>.launchIn(scope: CoroutineScope, context: CoroutineContext, start: CoroutineStart) #200

Open
@hoc081098

Description

@hoc081098

Ref: https://github.com/JetBrains/intellij-community/blob/b7c6890aa5c2e526791c082b82c755f71276f1fd/platform/collaboration-tools/src/com/intellij/collaboration/async/CoroutineUtil.kt#L71C1-L77C4

/**
 * Similar to [launchIn], but starts the collection with [CoroutineStart.UNDISPATCHED] and allows overriding context
 */
fun <T> Flow<T>.launchNowIn(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext): Job =
  scope.launch(context, CoroutineStart.UNDISPATCHED) {
    collect()
  }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions