mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 09:48:55 +00:00
fixed myisam
This commit is contained in:
@@ -129,7 +129,7 @@ class PowerProcess {
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private $tickCount = 10000;
|
||||
private $tickCount = 200000;
|
||||
|
||||
/**
|
||||
* Whether to add a timestamp to log output
|
||||
@@ -172,6 +172,8 @@ class PowerProcess {
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $shutdownCallback = null;
|
||||
|
||||
private $signalArray = array(
|
||||
SIGUSR1, // User-Defined 1
|
||||
SIGUSR2 // User-Defined 2
|
||||
@@ -465,6 +467,20 @@ class PowerProcess {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function setCallback($callback = null) {
|
||||
$this->shutdownCallback = $callback;
|
||||
}
|
||||
|
||||
public function runParentCode() {
|
||||
if (!$this->complete) {
|
||||
return $this->parentCheck();
|
||||
} else {
|
||||
if ($this->shutdownCallback !== null)
|
||||
call_user_func($this->shutdownCallback);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether we should be running the child code
|
||||
@@ -512,22 +528,14 @@ class PowerProcess {
|
||||
*
|
||||
* @param boolean $exit When set to true, Shutdown causes the script to exit
|
||||
*/
|
||||
public function Shutdown($exit = true) {
|
||||
while ($this->ThreadCount()) {
|
||||
public function Shutdown() {
|
||||
while($this->ThreadCount()) {
|
||||
$this->CheckThreads();
|
||||
$this->Tick();
|
||||
}
|
||||
|
||||
$this->complete = true;
|
||||
|
||||
// Send custom shutdown signal
|
||||
$this->SignalDispatch('shutdown');
|
||||
|
||||
if ($exit) exit;
|
||||
|
||||
return self::CALLBACK_IGNORE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines if a new process can be spawned
|
||||
*
|
||||
@@ -803,4 +811,3 @@ class PowerProcess {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ $newzpath = getenv('NEWZPATH');
|
||||
require_once("$newzpath/www/config.php");
|
||||
require_once(WWW_DIR."/lib/groups.php");
|
||||
require_once(WWW_DIR."/lib/binaries.php");
|
||||
require_once('PowerProcess.class.php');
|
||||
require_once("PowerProcess.class.php");
|
||||
|
||||
$groups = new Groups;
|
||||
$groupList = $groups->getActive();
|
||||
|
||||
@@ -5,7 +5,7 @@ $newzpath = getenv('NEWZPATH');
|
||||
require("$newzpath/www/config.php");
|
||||
require_once(WWW_DIR."/lib/groups.php");
|
||||
require_once(WWW_DIR."/lib/binaries.php");
|
||||
require_once('PowerProcess.class.php');
|
||||
require_once("PowerProcess.class.php");
|
||||
|
||||
$groups = new Groups;
|
||||
$groupList = $groups->getActive();
|
||||
|
||||
Reference in New Issue
Block a user