Skip to content

Mark CompletionStage<T>.await() as @DelicateCoroutinesApi #4358

@dovchinnikov

Description

@dovchinnikov
Contributor

This is unexpected that await cancels the CompletableFuture on coroutine cancellation. Since it's named like Deferred.await, it's expected to behave the same way without requiring to convert to Deferred first.

Activity

dovchinnikov

dovchinnikov commented on Feb 19, 2025

@dovchinnikov
ContributorAuthor

This could be already done before the decision on #4329.

dkhalanskyjb

dkhalanskyjb commented on Feb 25, 2025

@dkhalanskyjb
Collaborator

I'd prefer to decide on #4329 in the near future. If we decide to deprecate CompletionStage.await anyway, then forcing everyone into an opt-in first is going to create unnecessary friction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dovchinnikov@dkhalanskyjb

        Issue actions

          Mark `CompletionStage<T>.await()` as `@DelicateCoroutinesApi` · Issue #4358 · Kotlin/kotlinx.coroutines