Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Should we defend against sneaky completion? #4

Description

@rnarubin

Porting issue 37 from the enterprise repo

rkhadiwa commented on Nov 29, 2017

To what extent do we need to defend against a user who backdoors past the "read only" CompletionStage with cs.toCompletableFuture().complete(t) (or the more sinister cs.toCompletableFuture.obtrudeValue) ?

For example, AsyncFunnel gives out the same CompletableFuture to many distinct users. Not sure if there are any other APIs where this matters.

In JDK9 they added CompletableFuture.copy()/CompletableFuture.minimalStage presumably because they realized this is a problem. Should we defensively copy any CompletableFuture we hand out that could be reused? Seems pretty costly to defend against something that no sane user would actually do.

See http://cs.oswego.edu/pipermail/concurrency-interest/2016-July/015299.html

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions