Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Promise::all #6152

Merged
merged 17 commits into from
Feb 6, 2024
Merged

Add Promise::all #6152

merged 17 commits into from
Feb 6, 2024

Conversation

ShockedPlot7560
Copy link
Member

Introduction

This method is necessary in certain RPs, and this one tends to take out this modification, which is no longer specific to a single one.

Its aim is to make a Promise that will be resolved when all given Promises have been resolved. It is, however, rejected as soon as the first promise is rejected.

PR needing

Changes

API changes

  • Add static method all to Promise

Tests

See needing PR

@ShockedPlot7560 ShockedPlot7560 added Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Nov 11, 2023
src/promise/Promise.php Outdated Show resolved Hide resolved
src/promise/Promise.php Outdated Show resolved Hide resolved
src/promise/Promise.php Outdated Show resolved Hide resolved
@dktapps
Copy link
Member

dktapps commented Feb 6, 2024

After adding some unit tests I think this is OK to merge.

@dktapps dktapps merged commit 6bb84bc into minor-next Feb 6, 2024
26 checks passed
@dktapps dktapps added this to the 5.11 milestone Feb 6, 2024
@dktapps dktapps deleted the feat/promise-all branch March 15, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants