mirror of
https://github.com/danog/amp.git
synced 2024-11-27 12:35:02 +01:00
3af013d418
Amp Future instances double both as Promisor and Promise implementations when AMP_DEBUG is defined and set to false. This switch allows private Promise resolution safety by default at the expense of performance. Amp applications should set AMP_DEBUG to false in production environments to maximize performance.
13 lines
256 B
PHP
13 lines
256 B
PHP
<?php
|
|
|
|
namespace Amp\Test;
|
|
|
|
require __DIR__ . "/../vendor/autoload.php";
|
|
|
|
class PromisorPrivateImpl implements \Amp\Promisor {
|
|
use \Amp\PrivatePromisor;
|
|
}
|
|
class PromisorPublicImpl implements \Amp\Promisor, \Amp\Promise {
|
|
use \Amp\PublicPromisor;
|
|
}
|