parallel/lib/Worker/WorkerFactory.php

16 lines
306 B
PHP
Raw Normal View History

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