1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 09:27:46 +01:00

Rename launch to async

Thus we've come full circle :P
This commit is contained in:
Aaron Piotrowski 2021-12-02 13:44:10 -06:00
parent 31a34bcb18
commit 3926b3f978
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
3 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ final class Future
/**
* @param FutureState<T> $state
*
* @internal Use {@see Deferred} or {@see launch()} to create and resolve a Future.
* @internal Use {@see Deferred} or {@see async()} to create and resolve a Future.
*/
public function __construct(FutureState $state)
{

View File

@ -16,7 +16,7 @@ use Revolt\EventLoop\UnsupportedFeatureException;
*
* @return Future<T>
*/
function launch(\Closure $closure): Future
function async(\Closure $closure): Future
{
static $run = null;

View File

@ -11,8 +11,8 @@ use Amp\PHPUnit\LoopCaughtException;
use Amp\PHPUnit\TestException;
use Amp\TimeoutCancellationToken;
use Revolt\EventLoop;
use function Amp\async;
use function Amp\delay;
use function Amp\launch;
class FutureTest extends AsyncTestCase
{
@ -319,13 +319,13 @@ class FutureTest extends AsyncTestCase
* @template T
*
* @param float $seconds
* @param T $value
* @param T $value
*
* @return Future<T>
*/
private function delay(float $seconds, mixed $value): Future
{
return launch(
return async(
/**
* @return T
*/