File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,19 @@ public function signal(int $signal)
50
50
return $ this ;
51
51
}
52
52
53
+ /**
54
+ * Stop the process if it is still running.
55
+ *
56
+ * @param float $timeout
57
+ * @param int|null $signal
58
+ *
59
+ * @return int|null
60
+ */
61
+ public function stop (float $ timeout = 10 , ?int $ signal = null )
62
+ {
63
+ return $ this ->process ->stop ($ timeout , $ signal );
64
+ }
65
+
53
66
/**
54
67
* Determine if the process is still running.
55
68
*
Original file line number Diff line number Diff line change @@ -35,6 +35,19 @@ public function signal(int $signal)
35
35
return $ this ->running ()->each ->signal ($ signal );
36
36
}
37
37
38
+ /**
39
+ * Stop all processes that are still running
40
+ *
41
+ * @param float $timeout
42
+ * @param int|null $signal
43
+ *
44
+ * @return \Illuminate\Support\Collection
45
+ */
46
+ public function stop (float $ timeout = 10 , ?int $ signal = null )
47
+ {
48
+ return $ this ->running ()->each ->stop ($ timeout , $ signal );
49
+ }
50
+
38
51
/**
39
52
* Get the processes in the pool that are still currently running.
40
53
*
You can’t perform that action at this time.
0 commit comments