php-async/src/functions.php
2019-01-16 16:39:14 +01:00

28 lines
405 B
PHP

<?php
namespace Joop\Asynchronous;
if (!function_exists('async_run')) {
/**
* @param callable $function
* @param mixed ...$parameters
* @return Promise|null
*/
function async(callable $function, ...$parameters)
{
return Asynchronous::run($function, ...$parameters);
}
}
if (!function_exists('async_cleanup')) {
/**
*
*/
function async_cleanup()
{
Asynchronous::cleanup();
}
}