2016-08-22 06:40:48 +02:00
|
|
|
<?php declare(strict_types = 1);
|
2016-08-18 18:04:48 +02:00
|
|
|
|
|
|
|
namespace Amp\Concurrent\Worker;
|
2015-08-14 19:25:07 +02:00
|
|
|
|
2015-08-28 05:51:50 +02:00
|
|
|
/**
|
2015-12-05 06:50:32 +01:00
|
|
|
* Interface for factories used to create new workers.
|
2015-08-28 05:51:50 +02:00
|
|
|
*/
|
2016-08-18 18:04:48 +02:00
|
|
|
interface WorkerFactory {
|
2015-08-28 05:51:50 +02:00
|
|
|
/**
|
2015-12-05 06:50:32 +01:00
|
|
|
* Creates a new worker instance.
|
2015-08-28 05:51:50 +02:00
|
|
|
*
|
2015-12-05 06:50:32 +01:00
|
|
|
* @return Worker The newly created worker.
|
2015-08-28 05:51:50 +02:00
|
|
|
*/
|
2016-01-23 07:00:56 +01:00
|
|
|
public function create(): Worker;
|
2015-08-14 19:25:07 +02:00
|
|
|
}
|