2016-12-30 02:16:04 +01:00
|
|
|
<?php
|
2016-08-18 18:04:48 +02:00
|
|
|
|
2016-08-23 23:47:40 +02:00
|
|
|
namespace Amp\Parallel\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
|
|
|
}
|