use function Amp\async;
use Amp\Mysql\MysqlConfig;
use Amp\Mysql\MysqlConnectionPool;
$config = MysqlConfig::fromAuthority('ip', 'user', 'psw', 'table');
$db = new MysqlConnectionPool($config);
$db->query("INSERT INTO test (str) VALUES ('start')");
$future = async(function($db1) {
$db1->query("INSERT INTO test (str) VALUES ('query 1')");
$db1->query("INSERT INTO test (str) VALUES ('query 2')"); //
Подробнее здесь: https://stackoverflow.com/questions/791 ... e-requests