introduce AsyncEvent and ::callAsync()

An asynchronous event is one that allows the addition of promises to be resolved before being completed.
This implementation integrates priority levels, allowing you to wait for all promises added to one level before moving on to the next.
This is made possible by separating the event call logic into several functions, which can then be integrated into AsyncEventTrait::callAsync()
This commit is contained in:
ShockedPlot7560
2023-10-14 23:13:35 +02:00
parent 5fe57a8f6f
commit a84fc2b901
4 changed files with 158 additions and 1 deletions

View File

@ -1205,3 +1205,8 @@ parameters:
count: 1
path: ../../phpunit/scheduler/AsyncPoolTest.php
-
message: "#^Right side of && is always true\\.$#"
count: 1
path: ../../../src/promise/Promise.php