public function work_sets_count($bucket = self::DEFAULT_BUCKET, $process_all_buckets = false)
	{
		// if asked to process all buckets, count all of them and return the count
		if ($process_all_buckets === true)
		{
			$count = 0;
			foreach ($this->buckets as $bucket_slot)
			{
				$count += count($this->work_units[$bucket_slot]);
			}
			return $count;
		}

		return count($this->work_units[$bucket]);
	}
public function work_sets_count($bucket = self::DEFAULT_BUCKET, $process_all_buckets = false)
	{
		// if asked to process all buckets, count all of them and return the count
		if ($process_all_buckets === true)
		{
			$count = 0;
			foreach ($this->buckets as $bucket_slot)
			{
				$count += count($this->work_units[$bucket_slot]);
			}
			return $count;
		}

		return count($this->work_units[$bucket]);
	}
public function work_sets_count ( $ bucket = self :: DEFAULT_BUCKET , $ process_all_buckets = false ) { // if asked to process all buckets, count all of them and return the count if ( $ process_all_buckets === true ) { $ count = 0 ; foreach ( $ this -> buckets as $ bucket_slot ) { $ count += count ( $ this -> work_units [ $ bucket_slot ] ) ; } return $ count ; } return count ( $ this -> work_units [ $ bucket ] ) ; }
Return the number of work sets queued

A work set is a chunk of items to be worked on.  A whole work set
is handed off to a child processes.  This size of the work sets can
be controlled by $this->max_work_per_child_set()

@param int  $bucket              The bucket to use.
@param bool $process_all_buckets If set to true, return the count of all buckets.
@return int the number of work sets queued
Return the number of work sets queued