Refactored namespace

This commit is contained in:
Joop Schilder 2019-01-16 17:28:52 +01:00
parent ca094df37e
commit 4dfd90646c
4 changed files with 10 additions and 8 deletions

View File

@ -9,7 +9,7 @@
"autoload": {
"files": ["src/functions.php"],
"psr-4": {
"Joop\\Asynchronous\\": ["src"]
"JoopSchilder\\Asynchronous\\": ["src"]
}
},
"require": {

View File

@ -1,6 +1,6 @@
<?php
namespace Joop\Asynchronous;
namespace JoopSchilder\Asynchronous;
/**
* Class Asynchronous
@ -128,7 +128,7 @@ class Asynchronous
/**
*
*/
public static function removedShmBlock()
public static function removeShmBlock()
{
$instance = self::getInstance();
if (is_resource($instance->shm)) {
@ -232,19 +232,20 @@ class Asynchronous
return;
self::awaitChildren();
self::removedShmBlock();
self::removeShmBlock();
});
/*
* The signal handler
*/
foreach([SIGINT, SIGTERM, SIGUSR1] as $signal)
foreach([SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGTERM] as $signal)
pcntl_signal($signal, function($s) use (&$instance) {
if ($instance->isChild)
return;
self::killChildren();
self::awaitChildren();
self::removedShmBlock();
self::removeShmBlock();
});
}

View File

@ -1,6 +1,6 @@
<?php
namespace Joop\Asynchronous;
namespace JoopSchilder\Asynchronous;
class Promise
{

View File

@ -1,6 +1,7 @@
<?php
namespace Joop\Asynchronous;
namespace JoopSchilder\Asynchronous;
if (!function_exists('async_run')) {