public function max_children_set($value, $bucket = self::DEFAULT_BUCKET)
	{
		if ($value < 1)
		{
			$value = 0;
			$this->log(($bucket === self::DEFAULT_BUCKET ? 'default' : $bucket) . ' bucket max_children set to 0, bucket will be disabled', self::LOG_LEVEL_WARN);
		}

		$old = $this->max_children[$bucket];
		$this->max_children[$bucket] = $value;

		if ($this->child_persistent_mode[$bucket] && $old > $this->max_children[$bucket])
		{
			$difference = $old - $this->max_children[$bucket];
			$killed = 0;
			// Kill some of the child processes
			foreach ($this->forked_children as $pid => $child)
			{
				if ($child['bucket'] == $bucket && $child['status'] == self::WORKER)
				{
					$this->safe_kill($pid, SIGINT, "max_children lowered for bucket $bucket, killing pid $pid");
					$killed++;

					if ($killed == $difference)
					{
						break;
					}
				}
			}
		}
	}
public function max_children_set($value, $bucket = self::DEFAULT_BUCKET)
	{
		if ($value < 1)
		{
			$value = 0;
			$this->log(($bucket === self::DEFAULT_BUCKET ? 'default' : $bucket) . ' bucket max_children set to 0, bucket will be disabled', self::LOG_LEVEL_WARN);
		}

		$old = $this->max_children[$bucket];
		$this->max_children[$bucket] = $value;

		if ($this->child_persistent_mode[$bucket] && $old > $this->max_children[$bucket])
		{
			$difference = $old - $this->max_children[$bucket];
			$killed = 0;
			// Kill some of the child processes
			foreach ($this->forked_children as $pid => $child)
			{
				if ($child['bucket'] == $bucket && $child['status'] == self::WORKER)
				{
					$this->safe_kill($pid, SIGINT, "max_children lowered for bucket $bucket, killing pid $pid");
					$killed++;

					if ($killed == $difference)
					{
						break;
					}
				}
			}
		}
	}
public function max_children_set ( $ value , $ bucket = self :: DEFAULT_BUCKET ) { if ( $ value < 1 ) { $ value = 0 ; $ this -> log ( ( $ bucket === self :: DEFAULT_BUCKET ? 'default' : $ bucket ) . ' bucket max_children set to 0, bucket will be disabled' , self :: LOG_LEVEL_WARN ) ; } $ old = $ this -> max_children [ $ bucket ] ; $ this -> max_children [ $ bucket ] = $ value ; if ( $ this -> child_persistent_mode [ $ bucket ] && $ old > $ this -> max_children [ $ bucket ] ) { $ difference = $ old - $ this -> max_children [ $ bucket ] ; $ killed = 0 ; // Kill some of the child processes foreach ( $ this -> forked_children as $ pid => $ child ) { if ( $ child [ 'bucket' ] == $ bucket && $ child [ 'status' ] == self :: WORKER ) { $ this -> safe_kill ( $ pid , SIGINT , "max_children lowered for bucket $bucket, killing pid $pid" ) ; $ killed ++ ; if ( $ killed == $ difference ) { break ; } } } } }
Allows the app to set the max_children value
@access public
@param int $value  The new max_children value.
@param int $bucket The bucket to use.
@return void
Allows the app to set the max_children value