WyriHaximus · GitHub

@WyriHaximus

@WyriHaximus

kelunik

@WyriHaximus

Merged

@WyriHaximus

@clue @WyriHaximus

@WyriHaximus

clue and others added 2 commits

November 22, 2021 15:18
While there is no technical need to add this for this, we also don't want to block other projects creating adapters. However, this interoperability support is undocumented and as such unsupported. Use at your own risk.

@WyriHaximus

clue

clue approved these changes Nov 22, 2021

@clue

kelunik added a commit to revoltphp/event-loop that referenced this pull request

Nov 22, 2021
This is equivalent to the interface change in reactphp/async#15 to allow different implementations.
This also allows decorating `Suspension` to implement listeners like proposed in #2.

Merged

kelunik added a commit to revoltphp/event-loop that referenced this pull request

Nov 22, 2021
This is equivalent to the interface change in reactphp/async#15 to allow different implementations.
This also allows decorating `Suspension` to implement listeners like proposed in #2.

kelunik added a commit to revoltphp/event-loop that referenced this pull request

Nov 22, 2021
This is equivalent to the interface change in reactphp/async#15 to allow different implementations.
This also allows decorating `Suspension` to implement listeners like proposed in #2.

Merged

@clue clue mentioned this pull request

Nov 23, 2021

Merged

@clue clue mentioned this pull request

Nov 30, 2021

Merged

@clue clue mentioned this pull request

Jan 25, 2022

Merged

@clue clue mentioned this pull request

Feb 2, 2022

Closed

This was referenced

Feb 16, 2022

Merged

Merged

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Feb 20, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

Merged

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Feb 21, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Feb 21, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Feb 24, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Feb 24, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Mar 2, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Mar 3, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Mar 3, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Mar 4, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

WyriHaximus added a commit to WyriHaximus-labs/async that referenced this pull request

Mar 4, 2022
Since `async()` returns a promise and those are normally cancelable, implementing this puts them in line with the rest of our ecosystem. As such the following example will throw a timeout exception from the canceled `sleep()` call.
```php
$promise = async(static function (): int {
    echo 'a';
    await(sleep(2));
    echo 'b';
    return time();
})();
$promise->cancel();
await($promise);
````
This builds on top of reactphp#15, reactphp#18, reactphp#19, reactphp#26, reactphp#28, reactphp#30, and reactphp#32.

@clue clue mentioned this pull request

Oct 26, 2022

Open

This was referenced

Dec 6, 2022

Merged

Merged

Merged

@clue clue mentioned this pull request

Jun 13, 2023

Merged

@clue clue mentioned this pull request

May 22, 2024

Merged

flyokai pushed a commit to flyokai/revolt-event-loop that referenced this pull request

Apr 25, 2026
This is equivalent to the interface change in reactphp/async#15 to allow different implementations.
This also allows decorating `Suspension` to implement listeners like proposed in revoltphp/event-loop#2.

Read the original on github.com ↗