Refactored namespace
This commit is contained in:
		
							parent
							
								
									ca094df37e
								
							
						
					
					
						commit
						4dfd90646c
					
				@ -9,7 +9,7 @@
 | 
				
			|||||||
    "autoload": {
 | 
					    "autoload": {
 | 
				
			||||||
        "files": ["src/functions.php"],
 | 
					        "files": ["src/functions.php"],
 | 
				
			||||||
        "psr-4": {
 | 
					        "psr-4": {
 | 
				
			||||||
            "Joop\\Asynchronous\\": ["src"]
 | 
					            "JoopSchilder\\Asynchronous\\": ["src"]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "require": {
 | 
					    "require": {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Joop\Asynchronous;
 | 
					namespace JoopSchilder\Asynchronous;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Class Asynchronous
 | 
					 * Class Asynchronous
 | 
				
			||||||
@ -128,7 +128,7 @@ class Asynchronous
 | 
				
			|||||||
	/**
 | 
						/**
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public static function removedShmBlock()
 | 
						public static function removeShmBlock()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		$instance = self::getInstance();
 | 
							$instance = self::getInstance();
 | 
				
			||||||
		if (is_resource($instance->shm)) {
 | 
							if (is_resource($instance->shm)) {
 | 
				
			||||||
@ -232,19 +232,20 @@ class Asynchronous
 | 
				
			|||||||
				return;
 | 
									return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			self::awaitChildren();
 | 
								self::awaitChildren();
 | 
				
			||||||
			self::removedShmBlock();
 | 
								self::removeShmBlock();
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * The signal handler
 | 
							 * The signal handler
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		foreach([SIGINT, SIGTERM, SIGUSR1] as $signal)
 | 
							foreach([SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGTERM] as $signal)
 | 
				
			||||||
			pcntl_signal($signal, function($s) use (&$instance) {
 | 
								pcntl_signal($signal, function($s) use (&$instance) {
 | 
				
			||||||
				if ($instance->isChild)
 | 
									if ($instance->isChild)
 | 
				
			||||||
					return;
 | 
										return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				self::killChildren();
 | 
									self::killChildren();
 | 
				
			||||||
				self::awaitChildren();
 | 
									self::awaitChildren();
 | 
				
			||||||
				self::removedShmBlock();
 | 
									self::removeShmBlock();
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Joop\Asynchronous;
 | 
					namespace JoopSchilder\Asynchronous;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Promise
 | 
					class Promise
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,7 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Joop\Asynchronous;
 | 
					namespace JoopSchilder\Asynchronous;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (!function_exists('async_run')) {
 | 
					if (!function_exists('async_run')) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user