-
-
Notifications
You must be signed in to change notification settings - Fork 166
Expand file tree
/
Copy pathProcessExecutor.php
More file actions
34 lines (29 loc) · 832 Bytes
/
ProcessExecutor.php
File metadata and controls
34 lines (29 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace Tempest\Process;
interface ProcessExecutor
{
/**
* Runs the given process.
*
* @param string|PendingProcess $command
*/
public function run(string|PendingProcess $command): ProcessResult;
/**
* Invokes the given process asynchronously.
*
* @param string|PendingProcess $command
*/
public function start(string|PendingProcess $command): InvokedProcess;
/**
* Returns a pool of processes, which can be executed.
*
* @param iterable<PendingProcess|string> $pool
*/
public function pool(iterable $pool): Pool;
/**
* Executes a pool of processes concurrently and returns the results.
*
* @param iterable<PendingProcess|string> $pool
*/
public function concurrently(iterable $pool): ProcessPoolResults;
}