Skip to content

Cancellation of promise collections #33

@clue

Description

@clue

What is the recommended way to cancel promise collections?

This library provides several promise collection primitives, which all have valid use cases.

One might assume the following is the way to go:

$promises = array(
    accessSomeRemoteResource(),
    accessSomeRemoteResource(),
    accessSomeRemoteResource()
);

$promise = \React\Promise\all($promises);

// what does this do?
$promise->cancel();

How does this cope with cancellation support?

This is currently not implemented, i.e. calling cancel() currently has no effect.

Should we consider adding this?

Also, if yes, how could cancellation support work for the other primitives?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions