1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 17:52:14 +01:00
parallel/src/Worker/Pool.php

23 lines
459 B
PHP
Raw Normal View History

<?php
namespace Icicle\Concurrent\Worker;
/**
2015-12-05 06:50:32 +01:00
* An interface for worker pools.
*/
2015-12-05 06:50:32 +01:00
interface Pool extends Worker
{
2015-08-29 03:30:53 +02:00
/**
2015-12-05 06:50:32 +01:00
* Gets the number of workers currently running in the pool.
*
2015-12-05 06:50:32 +01:00
* @return int The number of workers.
*/
2015-12-05 06:50:32 +01:00
public function getWorkerCount();
/**
2015-12-05 06:50:32 +01:00
* Gets the number of workers that are currently idle.
*
2015-12-05 06:50:32 +01:00
* @return int The number of idle workers.
*/
2015-12-05 06:50:32 +01:00
public function getIdleWorkerCount();
}