Add brackets, update README, refactored naming

This commit is contained in:
joopschilder committed 2019-12-08 01:10:25 +01:00
1 parent f29d1a0d7a
commit eef63af0b0
8 files changed
+210 -187

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
<?php
use JoopSchilder\Asynchronous\Asynchronous;
use JoopSchilder\Asynchronous\Promise;
if (!function_exists('async')) {
/**
* @param callable $function
* @param mixed ...$parameters
* @return Promise
*/
function async(callable $function, ...$parameters)
{
return Asynchronous::run($function, ...$parameters);
}
}
if (!function_exists('async_cleanup')) {
/**
*
*/
function async_cleanup()
{
Asynchronous::cleanup();
}
}
if (!function_exists('async_wait_all')) {
/**
*
*/
function async_wait_all()
{
Asynchronous::waitForChildren();
}
}